public class Operation
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CACHE_CLOSE |
static java.util.List |
clientRepeatableReadOps |
static java.lang.String |
ENTRY_CONTAINS_KEY |
static java.lang.String |
ENTRY_CONTAINS_VALUE |
static java.lang.String |
ENTRY_CONTAINS_VALUE_FOR_KEY |
static java.lang.String |
ENTRY_CREATE |
static java.lang.String |
ENTRY_DESTROY |
static java.lang.String |
ENTRY_GET_ENTRY_EXIST_KEY |
static java.lang.String |
ENTRY_GET_EXIST_KEY |
static java.lang.String |
ENTRY_GET_NEW_KEY |
static java.lang.String |
ENTRY_GET_PREV_KEY |
static java.lang.String |
ENTRY_GETALL |
static java.lang.String |
ENTRY_INVAL |
static java.lang.String |
ENTRY_LOCAL_DESTROY |
static java.lang.String |
ENTRY_LOCAL_INVAL |
static java.lang.String |
ENTRY_PUTALL |
static java.lang.String |
ENTRY_REMOVE |
static java.lang.String |
ENTRY_UPDATE |
static java.util.List |
nonrepeatableReadOps |
static java.lang.String |
REGION_CREATE |
static java.lang.String |
REGION_DESTROY |
static java.lang.String |
REGION_ENTRIES |
static java.lang.String |
REGION_ENTRY_SET |
static java.lang.String |
REGION_INVAL |
static java.lang.String |
REGION_KEY_SET |
static java.lang.String |
REGION_KEYS |
static java.lang.String |
REGION_LOCAL_DESTROY |
static java.lang.String |
REGION_LOCAL_INVAL |
static java.lang.String |
REGION_VALUES |
static java.util.List |
repeatableReadOps |
| Constructor and Description |
|---|
Operation(java.lang.String regionName,
java.lang.Object key,
java.lang.String opName,
java.lang.Object oldValue,
java.lang.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(java.lang.Object anObj)
Returns true if the argument equals the receiver, false otherwise
|
boolean |
equalsEventOp(java.lang.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.
|
java.lang.Object |
getKey()
Get the key for the operation
|
java.lang.Object |
getNewValue()
Get the new value
|
java.lang.Object |
getOldValue()
Get the old value
|
java.lang.String |
getOpName()
Get the operation name
|
java.lang.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(java.lang.Object newValue)
Set the new value
|
void |
setOldValue(java.lang.Object oldValue)
Set the old value
|
void |
setOpName(java.lang.String opName)
Set the operation name
|
void |
setRepeatableRead(boolean abool)
Set the repeatable read value
|
java.lang.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 java.lang.String ENTRY_CREATE
public static final java.lang.String ENTRY_UPDATE
public static final java.lang.String ENTRY_PUTALL
public static final java.lang.String ENTRY_DESTROY
public static final java.lang.String ENTRY_LOCAL_DESTROY
public static final java.lang.String ENTRY_INVAL
public static final java.lang.String ENTRY_LOCAL_INVAL
public static final java.lang.String ENTRY_GET_NEW_KEY
public static final java.lang.String ENTRY_GET_EXIST_KEY
public static final java.lang.String ENTRY_GET_PREV_KEY
public static final java.lang.String ENTRY_GET_ENTRY_EXIST_KEY
public static final java.lang.String ENTRY_GETALL
public static final java.lang.String ENTRY_CONTAINS_KEY
public static final java.lang.String ENTRY_CONTAINS_VALUE_FOR_KEY
public static final java.lang.String ENTRY_CONTAINS_VALUE
public static final java.lang.String ENTRY_REMOVE
public static final java.lang.String REGION_CREATE
public static final java.lang.String REGION_DESTROY
public static final java.lang.String REGION_LOCAL_DESTROY
public static final java.lang.String REGION_INVAL
public static final java.lang.String REGION_LOCAL_INVAL
public static final java.lang.String REGION_KEYS
public static final java.lang.String REGION_KEY_SET
public static final java.lang.String REGION_VALUES
public static final java.lang.String REGION_ENTRIES
public static final java.lang.String REGION_ENTRY_SET
public static final java.lang.String CACHE_CLOSE
public static java.util.List repeatableReadOps
public static java.util.List nonrepeatableReadOps
public static java.util.List clientRepeatableReadOps
public Operation(java.lang.String regionName,
java.lang.Object key,
java.lang.String opName,
java.lang.Object oldValue,
java.lang.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 java.lang.String getRegionName()
public java.lang.Object getKey()
public java.lang.String getOpName()
public java.lang.Object getOldValue()
public java.lang.Object getNewValue()
public void setOpName(java.lang.String opName)
public void setOldValue(java.lang.Object oldValue)
public void setNewValue(java.lang.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(java.lang.Object anObj)
anObj - an Operation re-generated from an Eventpublic boolean equals(java.lang.Object anObj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean entryOpAffectedBy(Operation op)
public boolean affectedBy(Operation op)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.