Class ProviderDataStructureItem<TValue>
- java.lang.Object
-
- com.alachisoft.ncache.runtime.datasourceprovider.ProviderItemBase
-
- com.alachisoft.ncache.runtime.datasourceprovider.ProviderDataStructureItem<TValue>
-
public class ProviderDataStructureItem<TValue> extends ProviderItemBase
ProviderDataStructureItem is just like a CacheItem , but it has some limited fields
-
-
Constructor Summary
Constructors Constructor Description ProviderDataStructureItem(long counter)Initializes an instance of counter Item.ProviderDataStructureItem(DistributedDataStructureType type)Initializes an instance of ProviderDataStructureItem.ProviderDataStructureItem(TValue value)Initializes an instance of DataStructureItem Item.ProviderDataStructureItem(TValue value, DistributedDataStructureType type)Initializes an instance of CacheItem.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCounter()Gets the value of the counter.TValuegetData()Gets the value stored in ProviderDataStructureItem.<T extends JsonValueBase>
TgetDataAsJson()Gets the value of the datastructure in the form ofJsonValueBase.DistributedDataStructureTypegetType()Gets the type of the DistributedDataStructure.voidsetCounter(long value)Sets the value of the counter.voidsetData(TValue value)Sets the value that is stored in ProviderDataStructureItem.voidsetType(DistributedDataStructureType value)Sets the type of the DistributedDataStructure.-
Methods inherited from class com.alachisoft.ncache.runtime.datasourceprovider.ProviderItemBase
getAbsoluteExpiration, getBitSet, getDependency, getExpiration, getGroup, getIsJavaReadThrough, getItemPriority, getNamedTags, getResyncItemOnExpiration, getResyncOptions, getResyncProviderName, getSlidingExpiration, getTags, setBitSet, setDependency, setExpiration, setGroup, setIsJavaReadThrough, setItemPriority, setNamedTags, setResyncOptions, setTags
-
-
-
-
Constructor Detail
-
ProviderDataStructureItem
public ProviderDataStructureItem(TValue value)
Initializes an instance of DataStructureItem Item.- Parameters:
value- Data object.
-
ProviderDataStructureItem
public ProviderDataStructureItem(long counter)
Initializes an instance of counter Item.- Parameters:
counter- Value to initiaize with.
-
ProviderDataStructureItem
public ProviderDataStructureItem(DistributedDataStructureType type)
Initializes an instance of ProviderDataStructureItem.- Parameters:
type-DistributedDataStructureTypecontaining type of distributed data structure.
-
ProviderDataStructureItem
public ProviderDataStructureItem(TValue value, DistributedDataStructureType type)
Initializes an instance of CacheItem.- Parameters:
value- Data object.type-DistributedDataStructureTypecontaining type of distributed value type.
-
-
Method Detail
-
getType
public final DistributedDataStructureType getType()
Gets the type of the DistributedDataStructure.- Returns:
- The type of the DistributedDataStructure.
-
setType
public final void setType(DistributedDataStructureType value)
Sets the type of the DistributedDataStructure.- Parameters:
value- The type of the DistributedDataStructure.
-
getData
public TValue getData()
Gets the value stored in ProviderDataStructureItem.- Returns:
- The value stored in ProviderDataStructureItem.
-
setData
public void setData(TValue value)
Sets the value that is stored in ProviderDataStructureItem.- Parameters:
value- The value to be stored in ProviderDataStructureItem.
-
getCounter
public final long getCounter()
Gets the value of the counter.- Returns:
- The value of the counter.
-
setCounter
public final void setCounter(long value)
Sets the value of the counter.- Parameters:
value- The value that is to be set as counter value.
-
getDataAsJson
public <T extends JsonValueBase> T getDataAsJson()
Gets the value of the datastructure in the form ofJsonValueBase.- Type Parameters:
T- Type of the JsonValueBase.- Returns:
- The JsonValueBase instance.
-
-