Class NumberIncrementor
The NumberIncrementor entry processor is used to increment a property value of a Byte, Int16, Int32, Int64, Single, Double and Decimal type.
Inherited Members
Namespace: Tangosol.Util.Processor
Assembly: Coherence.dll
Syntax
public class NumberIncrementor : PropertyProcessor, IEntryProcessor, IPortableObject
Constructors
NumberIncrementor()
Default constructor.
Declaration
public NumberIncrementor()
NumberIncrementor(string, object, bool)
Construct an NumberIncrementor processor that will increment a property value by a specified amount, returning either the old or the new value as specified.
Declaration
public NumberIncrementor(string name, object numInc, bool postIncrement)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The property name. |
| object | numInc | The object representing the magnitude and sign of the increment. |
| bool | postIncrement | Pass true to return the value as it was before it was incremented, or pass false to return the value as it is after it is incremented. |
Remarks
The .NET type of the numInc parameter will
dictate the .NET type of the original and the new value.
NumberIncrementor(PropertyManipulator, object, bool)
Construct an NumberIncrementor processor that will increment a property value by a specified amount, returning either the old or the new value as specified.
Declaration
public NumberIncrementor(PropertyManipulator manipulator, object numInc, bool postIncrement)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyManipulator | manipulator | The PropertyManipulator; could be |
| object | numInc | The object representing the magnitude and sign of the increment. |
| bool | postIncrement | Pass true to return the value as it was before it was incremented, or pass false to return the value as it is after it is incremented. |
Remarks
The .NET type of the numInc parameter will dictate the .NET type of the original and the new value.
Properties
Description
Returns this PropertyProcessor's description.
Declaration
protected override string Description { get; }
Property Value
| Type | Description |
|---|---|
| string | This PropertyProcessor's description. |
Overrides
Methods
Process(IInvocableCacheEntry)
Process an IInvocableCacheEntry.
Declaration
public override object Process(IInvocableCacheEntry entry)
Parameters
| Type | Name | Description |
|---|---|---|
| IInvocableCacheEntry | entry | The IInvocableCacheEntry to process. |
Returns
| Type | Description |
|---|---|
| object | The result of the processing, if any. |
Overrides
ReadExternal(IPofReader)
Restore the contents of a user type instance by reading its state using the specified IPofReader object.
Declaration
public override void ReadExternal(IPofReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| IPofReader | reader | The IPofReader from which to read the object's state. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| IOException | If an I/O error occurs. |
WriteExternal(IPofWriter)
Save the contents of a POF user type instance by writing its state using the specified IPofWriter object.
Declaration
public override void WriteExternal(IPofWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| IPofWriter | writer | The IPofWriter to which to write the object's state. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| IOException | If an I/O error occurs. |