Class ClusteredProperties
- java.lang.Object
-
- com.oracle.coherence.concurrent.executor.ClusteredProperties
-
- All Implemented Interfaces:
Task.Properties,ExternalizableLite,PortableObject,Serializable
public class ClusteredProperties extends Object implements Task.Properties, ExternalizableLite, PortableObject
A clustered implementation of aTask.Properties.- Since:
- 21.12
- Author:
- bo, lh
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClusteredProperties.PropertyKey<T extends Serializable>Property key.static classClusteredProperties.PropertyValue<T extends Serializable>Property value.static classClusteredProperties.SetPropertyValueProcessor<K extends Serializable,V extends Serializable>AnInvocableMap.EntryProcessorfor inserting/updatingClusteredProperties.PropertyKey/ClusteredProperties.PropertyValuemappings.
-
Field Summary
Fields Modifier and Type Field Description protected CacheServicem_serviceTheCacheServiceused by theTask, hence the property cache.protected Stringm_sTaskIdTheTaskID.
-
Constructor Summary
Constructors Constructor Description ClusteredProperties()Constructs anClusteredProperties(required for serialization).ClusteredProperties(String sTaskId, CacheService service)Constructs aClusteredPropertiesgiven the task ID and cache service.ClusteredProperties(String sTaskId, CacheService service, TaskProperties properties)Constructs aClusteredPropertiesgiven the task ID, cache service, and initial properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V extends Serializable>
Vget(String sKey)Get the property of a given key.protected CacheServicegetCacheService()Return theCacheServiceused by this executor service.<V extends Serializable>
Vput(String sKey, V value)Put a property with the given name and value.voidreadExternal(PofReader in)Restore the contents of a user type instance by reading its state using the specified PofReader object.voidreadExternal(DataInput in)Restore the contents of this object by loading the object's state from the passed DataInput object.voidwriteExternal(PofWriter out)Save the contents of a POF user type instance by writing its state using the specified PofWriter object.voidwriteExternal(DataOutput out)Save the contents of this object by storing the object's state into the passed DataOutput object.
-
-
-
Field Detail
-
m_service
protected CacheService m_service
TheCacheServiceused by theTask, hence the property cache.
-
-
Constructor Detail
-
ClusteredProperties
public ClusteredProperties()
Constructs anClusteredProperties(required for serialization).
-
ClusteredProperties
public ClusteredProperties(String sTaskId, CacheService service)
Constructs aClusteredPropertiesgiven the task ID and cache service.- Parameters:
sTaskId- theTaskIDservice- theCacheServiceused by theTask
-
ClusteredProperties
public ClusteredProperties(String sTaskId, CacheService service, TaskProperties properties)
Constructs aClusteredPropertiesgiven the task ID, cache service, and initial properties.- Parameters:
sTaskId- theTaskIDservice- theCacheServiceused by theTaskproperties- the properties to initialize
-
-
Method Detail
-
get
public <V extends Serializable> V get(String sKey)
Description copied from interface:Task.PropertiesGet the property of a given key.- Specified by:
getin interfaceTask.Properties- Type Parameters:
V- the value type of the property- Parameters:
sKey- the key of the property- Returns:
- the value of the property
-
put
public <V extends Serializable> V put(String sKey, V value)
Description copied from interface:Task.PropertiesPut a property with the given name and value.- Specified by:
putin interfaceTask.Properties- Type Parameters:
V- the value type of the property- Parameters:
sKey- the key of the propertyvalue- the value of the property- Returns:
- the previous value of the property or null if it's a new property
-
readExternal
public void readExternal(DataInput in) throws IOException
Description copied from interface:ExternalizableLiteRestore the contents of this object by loading the object's state from the passed DataInput object.- Specified by:
readExternalin interfaceExternalizableLite- Parameters:
in- the DataInput stream to read data from in order to restore the state of this object- Throws:
IOException- if an I/O exception occursNotActiveException- if the object is not in its initial state, and therefore cannot be deserialized into
-
writeExternal
public void writeExternal(DataOutput out) throws IOException
Description copied from interface:ExternalizableLiteSave the contents of this object by storing the object's state into the passed DataOutput object.- Specified by:
writeExternalin interfaceExternalizableLite- Parameters:
out- the DataOutput stream to write the state of this object to- Throws:
IOException- if an I/O exception occurs
-
readExternal
public void readExternal(PofReader in) throws IOException
Description copied from interface:PortableObjectRestore the contents of a user type instance by reading its state using the specified PofReader object.- Specified by:
readExternalin interfacePortableObject- Parameters:
in- the PofReader from which to read the object's state- Throws:
IOException- if an I/O error occurs
-
writeExternal
public void writeExternal(PofWriter out) throws IOException
Description copied from interface:PortableObjectSave the contents of a POF user type instance by writing its state using the specified PofWriter object.- Specified by:
writeExternalin interfacePortableObject- Parameters:
out- the PofWriter to which to write the object's state- Throws:
IOException- if an I/O error occurs
-
getCacheService
protected CacheService getCacheService()
Return theCacheServiceused by this executor service.- Returns:
- the
CacheServiceused by this executor service
-
-