Class PropertyProcessor
PropertyProcessor is a base class for IEntryProcessor implementations that depend on a PropertyManipulator.
Inherited Members
Namespace: Tangosol.Util.Processor
Assembly: Coherence.dll
Syntax
public abstract class PropertyProcessor : AbstractProcessor, IEntryProcessor, IPortableObject
Remarks
A typical concrete subclass would implement the Process(IInvocableCacheEntry) method using the following pattern:
public Object Process(IInvocableDictonaryEntry entry)
{
// retrieve an old property value
Object oldValue = entry;
... // calculate a new value and the process result
... // based on the old value and the processor's attributes
if (!newValue.Equals(oldValue))
{
// set the new property value
entry = newValue;
}
// return the process result
return oResult;
}
Constructors
PropertyProcessor()
Default constructor.
Declaration
public PropertyProcessor()
PropertyProcessor(string)
Construct a PropertyProcessor for the specified property name.
Declaration
public PropertyProcessor(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | A property name. |
PropertyProcessor(string, bool)
Construct a PropertyProcessor for the specified property name.
Declaration
public PropertyProcessor(string name, bool useIs)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | A property name. |
| bool | useIs | If true, the getter method will be prefixed with "Is". |
PropertyProcessor(PropertyManipulator)
Construct a PropertyProcessor based for the specified PropertyManipulator.
Declaration
public PropertyProcessor(PropertyManipulator manipulator)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyManipulator | manipulator | A PropertyManipulator; could be |
Fields
m_manipulator
The property value manipulator.
Declaration
protected IValueManipulator m_manipulator
Field Value
| Type | Description |
|---|---|
| IValueManipulator |
Properties
Description
Returns this PropertyProcessor's description.
Declaration
protected abstract string Description { get; }
Property Value
| Type | Description |
|---|---|
| string | This PropertyProcessor's description. |
Methods
Equals(object)
Compare the PropertyProcessor with another object to determine equality.
Declaration
public override bool Equals(object o)
Parameters
| Type | Name | Description |
|---|---|---|
| object | o | The object to compare with. |
Returns
| Type | Description |
|---|---|
| bool | true iff this PropertyProcessor and the passed object are equivalent PropertyProcessor. |
Overrides
Get(IInvocableCacheEntry)
Get the property value from the passed entry object.
Declaration
protected virtual object Get(IInvocableCacheEntry entry)
Parameters
| Type | Name | Description |
|---|---|---|
| IInvocableCacheEntry | entry | The Entry object. |
Returns
| Type | Description |
|---|---|
| object | The property value. |
See Also
GetHashCode()
Determine a hash value for the PropertyProcessor object according to the general GetHashCode() contract.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | An integer hash value for this PropertyProcessor object. |
Overrides
ReadExternal(IPofReader)
Restore the contents of a user type instance by reading its state using the specified IPofReader object.
Declaration
public virtual void ReadExternal(IPofReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| IPofReader | reader | The IPofReader from which to read the object's state. |
Exceptions
| Type | Condition |
|---|---|
| IOException | If an I/O error occurs. |
Set(IInvocableCacheEntry, object)
Set the property value into the passed entry object.
Declaration
protected virtual void Set(IInvocableCacheEntry entry, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| IInvocableCacheEntry | entry | The entry object. |
| object | value | A new property value. |
See Also
ToString()
Return a human-readable description for this PropertyProcessor.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A String description of the PropertyProcessor. |
Overrides
WriteExternal(IPofWriter)
Save the contents of a POF user type instance by writing its state using the specified IPofWriter object.
Declaration
public virtual void WriteExternal(IPofWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| IPofWriter | writer | The IPofWriter to which to write the object's state. |
Exceptions
| Type | Condition |
|---|---|
| IOException | If an I/O error occurs. |