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 class
ClusteredProperties.PropertyKey<T extends Serializable>
Property key.static class
Property value.static class
ClusteredProperties.SetPropertyValueProcessor<K extends Serializable, V extends Serializable>
AnInvocableMap.EntryProcessor
for inserting/updatingClusteredProperties.PropertyKey
/ClusteredProperties.PropertyValue
mappings. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CacheService
TheCacheService
used by theTask
, hence the property cache.protected String
TheTask
ID. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs anClusteredProperties
(required for serialization).ClusteredProperties
(String sTaskId, CacheService service) Constructs aClusteredProperties
given the task ID and cache service.ClusteredProperties
(String sTaskId, CacheService service, TaskProperties properties) Constructs aClusteredProperties
given the task ID, cache service, and initial properties. -
Method Summary
Modifier and TypeMethodDescription<V extends Serializable>
VGet the property of a given key.protected CacheService
Return theCacheService
used by this executor service.<V extends Serializable>
VPut a property with the given name and value.void
Restore the contents of a user type instance by reading its state using the specified PofReader object.void
Restore the contents of this object by loading the object's state from the passed DataInput object.void
writeExternal
(PofWriter out) Save the contents of a POF user type instance by writing its state using the specified PofWriter object.void
writeExternal
(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
TheCacheService
used by theTask
, hence the property cache.
-
-
Constructor Details
-
ClusteredProperties
public ClusteredProperties()Constructs anClusteredProperties
(required for serialization). -
ClusteredProperties
Constructs aClusteredProperties
given the task ID and cache service.- Parameters:
sTaskId
- theTask
IDservice
- theCacheService
used by theTask
-
ClusteredProperties
Constructs aClusteredProperties
given the task ID, cache service, and initial properties.- Parameters:
sTaskId
- theTask
IDservice
- theCacheService
used by theTask
properties
- the properties to initialize
-
-
Method Details
-
get
Description copied from interface:Task.Properties
Get the property of a given key.- Specified by:
get
in 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.Properties
Put a property with the given name and value.- Specified by:
put
in 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:ExternalizableLite
Restore the contents of this object by loading the object's state from the passed DataInput object.- Specified by:
readExternal
in 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:ExternalizableLite
Save the contents of this object by storing the object's state into the passed DataOutput object.- Specified by:
writeExternal
in 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:PortableObject
Restore the contents of a user type instance by reading its state using the specified PofReader object.- Specified by:
readExternal
in 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:PortableObject
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.- Specified by:
writeExternal
in interfacePortableObject
- Parameters:
out
- the PofWriter to which to write the object's state- Throws:
IOException
- if an I/O error occurs
-
getCacheService
Return theCacheService
used by this executor service.- Returns:
- the
CacheService
used by this executor service
-