public class Operation extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE_CLOSE |
static List |
clientRepeatableReadOps |
static String |
ENTRY_CONTAINS_KEY |
static String |
ENTRY_CONTAINS_VALUE |
static String |
ENTRY_CONTAINS_VALUE_FOR_KEY |
static String |
ENTRY_CREATE |
static String |
ENTRY_DESTROY |
static String |
ENTRY_GET_ENTRY_EXIST_KEY |
static String |
ENTRY_GET_EXIST_KEY |
static String |
ENTRY_GET_NEW_KEY |
static String |
ENTRY_GET_PREV_KEY |
static String |
ENTRY_GETALL |
static String |
ENTRY_INVAL |
static String |
ENTRY_LOCAL_DESTROY |
static String |
ENTRY_LOCAL_INVAL |
static String |
ENTRY_PUTALL |
static String |
ENTRY_REMOVE |
static String |
ENTRY_UPDATE |
static List |
nonrepeatableReadOps |
static String |
REGION_CREATE |
static String |
REGION_DESTROY |
static String |
REGION_ENTRIES |
static String |
REGION_ENTRY_SET |
static String |
REGION_INVAL |
static String |
REGION_KEY_SET |
static String |
REGION_KEYS |
static String |
REGION_LOCAL_DESTROY |
static String |
REGION_LOCAL_INVAL |
static String |
REGION_VALUES |
static List |
repeatableReadOps |
| Constructor and Description |
|---|
Operation(String regionName,
Object key,
String opName,
Object oldValue,
Object newValue)
Constructor to create an operation:
By default, repeatable read is false.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
affectedBy(Operation op) |
boolean |
entryOpAffectedBy(Operation op) |
boolean |
equals(Object anObj)
Returns true if the argument equals the receiver, false otherwise
|
boolean |
equalsEventOp(Object anObj)
Returns true if the argument equals the receiver, false otherwise
Differs from equals() in that the original operation may have an oldValue or newValue
of INVALID which must appear equal to the event's oldValue/newValue == null.
|
Object |
getKey()
Get the key for the operation
|
Object |
getNewValue()
Get the new value
|
Object |
getOldValue()
Get the old value
|
String |
getOpName()
Get the operation name
|
String |
getRegionName()
Get the region name for the operation
|
boolean |
isDoubleInvalidate()
Returns true if the operation is the result of two invalidates (which
implies the 2nd invalidate is a noop), false otherwise.
|
boolean |
isEntryCreate()
Returns true if the operation is an entryCreate
operation, false otherwise.
|
boolean |
isEntryDestroy()
Returns true if the operation is an entryDestroy or entryLocalDestroy
operation, false otherwise.
|
boolean |
isEntryGet()
Returns true if the operation is a any type of get (Existing, Prev, New)
operation, false otherwise.
|
boolean |
isEntryInvalidate()
Returns true if the operation is an entryInval or entryLocalInval
operation, false otherwise.
|
boolean |
isEntryOperation()
Returns true if the operation is an entry operation, false otherwise.
|
boolean |
isEntryUpdate()
Returns true if the operation is an entryInval or entryLocalInval
operation, false otherwise.
|
boolean |
isGetOperation()
Returns true if the operation is a get operation, false otherwise.
|
boolean |
isGetWithLoad()
Returns true if the operation is a get and oldValue was null or invalid, false otherwise.
|
boolean |
isInvalidate()
Returns true if the operation is an entry operation, false otherwise.
|
boolean |
isLocalOperation()
Returns true if the operation is a local operation, false otherwise.
|
boolean |
isPreviouslyInvalid()
Returns true if the operation's oldValue is any form of invalid
|
boolean |
isRegionCreate()
Returns true if the operation is a regionCreate operation, false otherwise.
|
boolean |
isRegionDestroy()
Returns true if the operation is a regionDestroy or regionLocalDestroy
operation, false otherwise.
|
boolean |
isRegionInvalidate()
Returns true if the operation is a regionInval or regionLocalInval
operation, false otherwise.
|
boolean |
isRegionOperation()
Returns true if the operation is a region operation, false otherwise.
|
boolean |
isRegionSetOperation()
Returns true if the operation is an operation that involves the entire
region keys and/or values as a set.
|
boolean |
isRepeatableRead()
Returns true if the operation is a write operation, false otherwise
|
boolean |
isWriteOperation()
Returns true if the operation is a write operation, false otherwise
|
void |
setNewValue(Object newValue)
Set the new value
|
void |
setOldValue(Object oldValue)
Set the old value
|
void |
setOpName(String opName)
Set the operation name
|
void |
setRepeatableRead(boolean abool)
Set the repeatable read value
|
String |
toString()
Return a string description of the operation
|
boolean |
usesSameRegion(Operation anOp)
Returns true if the operation uses the same region as anOp.
|
boolean |
usesSameRegionAndKey(Operation anOp)
Returns true if the operation uses the same region and key as anOp.
|
public static final String ENTRY_CREATE
public static final String ENTRY_UPDATE
public static final String ENTRY_PUTALL
public static final String ENTRY_DESTROY
public static final String ENTRY_LOCAL_DESTROY
public static final String ENTRY_INVAL
public static final String ENTRY_LOCAL_INVAL
public static final String ENTRY_GET_NEW_KEY
public static final String ENTRY_GET_EXIST_KEY
public static final String ENTRY_GET_PREV_KEY
public static final String ENTRY_GET_ENTRY_EXIST_KEY
public static final String ENTRY_GETALL
public static final String ENTRY_CONTAINS_KEY
public static final String ENTRY_CONTAINS_VALUE_FOR_KEY
public static final String ENTRY_CONTAINS_VALUE
public static final String ENTRY_REMOVE
public static final String REGION_CREATE
public static final String REGION_DESTROY
public static final String REGION_LOCAL_DESTROY
public static final String REGION_INVAL
public static final String REGION_LOCAL_INVAL
public static final String REGION_KEYS
public static final String REGION_KEY_SET
public static final String REGION_VALUES
public static final String REGION_ENTRIES
public static final String REGION_ENTRY_SET
public static final String CACHE_CLOSE
public static List repeatableReadOps
public static List nonrepeatableReadOps
public static List clientRepeatableReadOps
public Operation(String regionName, Object key, String opName, Object oldValue, Object newValue)
regionName - The name of the region involved in the operation.key - The key in the region involved in the operation.opName - Which operation was done.oldValue - The old value (before the operation), if applicable.newValue - The new value (after the operation), if applicable.public String getRegionName()
public Object getKey()
public String getOpName()
public Object getOldValue()
public Object getNewValue()
public void setOpName(String opName)
public void setOldValue(Object oldValue)
public void setNewValue(Object newValue)
public void setRepeatableRead(boolean abool)
public boolean usesSameRegionAndKey(Operation anOp)
anOp - The operation used to test its region and key.public boolean usesSameRegion(Operation anOp)
anOp - The operation used to test its region.public boolean isRepeatableRead()
public boolean isRegionSetOperation()
public boolean isWriteOperation()
public boolean isGetOperation()
public boolean isGetWithLoad()
public boolean isRegionOperation()
public boolean isEntryOperation()
public boolean isInvalidate()
public boolean isPreviouslyInvalid()
public boolean isLocalOperation()
public boolean isRegionCreate()
public boolean isRegionDestroy()
public boolean isRegionInvalidate()
public boolean isEntryUpdate()
public boolean isEntryInvalidate()
public boolean isEntryCreate()
public boolean isEntryDestroy()
public boolean isDoubleInvalidate()
public boolean isEntryGet()
public boolean equalsEventOp(Object anObj)
anObj - an Operation re-generated from an Eventpublic boolean equals(Object anObj)
public String toString()
public boolean entryOpAffectedBy(Operation op)
public boolean affectedBy(Operation op)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.