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.PropertyKeyProperty key.static classClusteredProperties.PropertyValueProperty value.
-
Field Summary
Fields Modifier and Type Field Description static StringCACHE_NAMETheNamedCachein which the properties will be place in.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.<V extends Serializable>
Vput(String sKey, V value)Put a property with the given name and value.voidreadExternal(PofReader in)voidreadExternal(DataInput in)voidwriteExternal(PofWriter out)voidwriteExternal(DataOutput out)
-
-
-
Field Detail
-
CACHE_NAME
public static String CACHE_NAME
TheNamedCachein which the properties will be place in.
-
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
- Specified by:
readExternalin interfaceExternalizableLite- Throws:
IOException
-
writeExternal
public void writeExternal(DataOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizableLite- Throws:
IOException
-
readExternal
public void readExternal(PofReader in) throws IOException
- Specified by:
readExternalin interfacePortableObject- Throws:
IOException
-
writeExternal
public void writeExternal(PofWriter out) throws IOException
- Specified by:
writeExternalin interfacePortableObject- Throws:
IOException
-
-