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 a
Task.Properties.- Since:
- 21.12
- Author:
- bo, lh
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClusteredProperties.PropertyKey<T extends Serializable>Property key.static classProperty value.static classClusteredProperties.SetPropertyValueProcessor<K extends Serializable, V extends Serializable>AnInvocableMap.EntryProcessorfor inserting/updatingClusteredProperties.PropertyKey/ClusteredProperties.PropertyValuemappings. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CacheServiceTheCacheServiceused by theTask, hence the property cache.protected StringTheTaskID. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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
Modifier and TypeMethodDescription<V extends Serializable>
VGet the property of a given key.protected CacheServiceReturn theCacheServiceused by this executor service.<V extends Serializable>
VPut a property with the given name and value.voidRestore the contents of a user type instance by reading its state using the specified PofReader object.voidRestore 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 Details
-
m_sTaskId
-
m_service
TheCacheServiceused by theTask, hence the property cache.
-
-
Constructor Details
-
ClusteredProperties
public ClusteredProperties()Constructs anClusteredProperties(required for serialization). -
ClusteredProperties
Constructs aClusteredPropertiesgiven the task ID and cache service.- Parameters:
sTaskId- theTaskIDservice- theCacheServiceused by theTask
-
ClusteredProperties
Constructs aClusteredPropertiesgiven the task ID, cache service, and initial properties.- Parameters:
sTaskId- theTaskIDservice- theCacheServiceused by theTaskproperties- the properties to initialize
-
-
Method Details
-
get
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
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
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 occurs
-
writeExternal
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
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
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
Return theCacheServiceused by this executor service.- Returns:
- the
CacheServiceused by this executor service
-