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 long
getCounter()
Gets the value of the counter.TValue
getData()
Gets the value stored in ProviderDataStructureItem.<T extends JsonValueBase>
TgetDataAsJson()
Gets the value of the datastructure in the form ofJsonValueBase
.DistributedDataStructureType
getType()
Gets the type of the DistributedDataStructure.void
setCounter(long value)
Sets the value of the counter.void
setData(TValue value)
Sets the value that is stored in ProviderDataStructureItem.void
setType(DistributedDataStructureType value)
Sets the type of the DistributedDataStructure.-
Methods inherited from class com.alachisoft.ncache.runtime.datasourceprovider.ProviderItemBase
getDependency, getExpiration, getGroup, getIsJavaReadThrough, getItemPriority, getNamedTags, getResyncItemOnExpiration, getResyncOptions, getResyncProviderName, getTags, setDependency, setExpiration, setGroup, setIsJavaReadThrough, setItemPriority, setNamedTags, setResyncOptions, setTags
-
-
-
-
Constructor Detail
-
ProviderDataStructureItem
public ProviderDataStructureItem(TValue value) throws OperationFailedException
Initializes an instance of DataStructureItem Item.- Parameters:
value
- Data object.- Throws:
OperationFailedException
-
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
-DistributedDataStructureType
containing type of distributed data structure.
-
ProviderDataStructureItem
public ProviderDataStructureItem(TValue value, DistributedDataStructureType type) throws OperationFailedException
Initializes an instance of CacheItem.- Parameters:
value
- Data object.type
-DistributedDataStructureType
containing type of distributed value type.- Throws:
OperationFailedException
-
-
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() throws OperationFailedException
Gets the value stored in ProviderDataStructureItem.- Returns:
- The value stored in ProviderDataStructureItem.
- Throws:
OperationFailedException
-
setData
public void setData(TValue value) throws OperationFailedException
Sets the value that is stored in ProviderDataStructureItem.- Parameters:
value
- The value to be stored in ProviderDataStructureItem.- Throws:
OperationFailedException
-
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.
-
-