Package org.apache.geode.cache
Class Operation
java.lang.Object
org.apache.geode.cache.Operation
- All Implemented Interfaces:
Serializable
Enumerated type for an event operation. This class describes the operation that generated the
event.
- Since:
- GemFire 5.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OperationA cache close.static final OperationA cache create.static final OperationA cache close triggered byLossAction.RECONNECT.static final OperationA 'check for existence of key' operation.static final OperationA 'check for existence of value' operation.static final OperationA 'check for existence of value for given key' operation.static final OperationAn entry creation.static final OperationAn entry distributed destroy.static final OperationAn entry local destroy caused by an eviction.static final OperationAn entry distributed destroy triggered by expirationstatic final OperationAn entry distributed invalidate triggered by expirationstatic final OperationAn entry local destroy triggered by expirationstatic final OperationAn entry local invalidate triggered by expirationstatic final OperationA cache close due to being forced out of the distributed system by other members.static final OperationA 'function execution' operation.static final OperationA 'value for key' operation.static final OperationA 'entry for key' operation.static final OperationA 'get for register interest' operation.static final OperationAn entry distributed invalidate.static final OperationAn entry local destroy.static final OperationAn entry local invalidate.static final OperationAn entry creation caused by a local loaderstatic final OperationAn entry update caused by a local load.static final OperationA marker operation.static final OperationAn entry creation caused by a net loaderstatic final OperationAn entry update caused by a net load.final bytebyte used as ordinal to represent this Operationstatic final OperationAn atomic entry creation operationstatic final OperationAn entry creation caused by a putAll invocationstatic final OperationAn entry update caused by a putAll invocation.static final OperationA region clear.static final OperationA region closestatic final OperationA region create.static final OperationA region distributed destroy.static final OperationA region distributed destroy triggered by expirationstatic final OperationA region distributed invalidate triggered by expirationstatic final OperationA region local destroy triggered by expirationstatic final OperationA region local invalidate triggered by expirationstatic final OperationA region distributed invalidate.static final OperationA region load snapshot.static final OperationA region local clear.static final OperationA region local destroy.static final OperationA region local invalidate.static final OperationA region destroy triggered byResumptionAction.REINITIALIZE.static final OperationAn atomic destroy destroy operationstatic final OperationAn entry distributed destroy caused by a removeAll.static final OperationAn atomic update operationstatic final OperationAn entry creation caused by a netsearchstatic final OperationAn entry update caused by a net search.static final OperationAn entry update.static final OperationAn internal operation used to update the version stamp of an entry. -
Method Summary
Modifier and TypeMethodDescriptionstatic OperationfromOrdinal(byte ordinal) Return the Operation represented by specified ordinalReturns the create operation that corresponds to this operation.Returns the update operation that corresponds to this operation.booleanReturns true if this operation is a ConcurrentMap operation that guarantees the old value to be returned no matter what expense may be incurred in doing so.booleanisClear()Returns true if the operation cleared the region.booleanisClose()Returns true if the operation closed the cache or a region.booleanReturns true if this operation checks whether given key is present in region.booleanReturns true if this operation checks whether given value is present in region.booleanReturns true if this operation checks whether value is present for the given key.booleanisCreate()Returns true if this operation created a new entry.booleanReturns true if the operation destroyed an entry.booleanReturns true if the operation may be distributed.booleanisEntry()Returns true if the operation applies to a single entry.booleanAnswer true if this operation resulted from evictionbooleanAnswer true if this operation resulted from expiration.booleanReturns true if this operation is function execution operation.booleanisGet()Returns true if this operation gets the value for given key.booleanReturns true if this operation gets the entry for given key.booleanReturns true if this operation is a get for register interest.booleanReturns true if the operation invalidated an entry.booleanisLoad()Returns true if this operation included running a loader.booleanisLocal()Returns true if the operation is limited to the local cache.booleanReturns true if this operation included a loader running in this cache.booleanReturns true if this operation included a loader running that was remote from the cache that requested it, i.e., a netLoad.booleanReturns true if this operation included anetSearch.booleanisPutAll()Returns true if this operation was initiated by a putAll.booleanisRegion()Returns true if the operation applies to the entire region.booleanReturns true if the operation destroyed a region.booleanReturns true if the operation invalidated a region.booleanReturns true if this operation was initiated by a removeAll.booleanReturns true if this operation was anet searchor aload.booleanisUpdate()Returns true if this operation updated an existing entry.toString()Returns a string representation for this operation.
-
Field Details
-
MARKER
A marker operation. -
CREATE
An entry creation.- See Also:
-
PUTALL_CREATE
An entry creation caused by a putAll invocation -
GET
A 'value for key' operation.- See Also:
-
GET_ENTRY
A 'entry for key' operation.- See Also:
-
CONTAINS_KEY
A 'check for existence of key' operation.- See Also:
-
CONTAINS_VALUE
A 'check for existence of value' operation.- See Also:
-
CONTAINS_VALUE_FOR_KEY
A 'check for existence of value for given key' operation.- See Also:
-
FUNCTION_EXECUTION
A 'function execution' operation.- See Also:
-
SEARCH_CREATE
An entry creation caused by a netsearch- See Also:
-
LOCAL_LOAD_CREATE
An entry creation caused by a local loader- See Also:
-
NET_LOAD_CREATE
An entry creation caused by a net loader- See Also:
-
UPDATE
An entry update.- See Also:
-
PUTALL_UPDATE
An entry update caused by a putAll invocation. -
SEARCH_UPDATE
An entry update caused by a net search.- See Also:
-
LOCAL_LOAD_UPDATE
An entry update caused by a local load.- See Also:
-
NET_LOAD_UPDATE
An entry update caused by a net load.- See Also:
-
INVALIDATE
An entry distributed invalidate.- See Also:
-
LOCAL_INVALIDATE
An entry local invalidate.- See Also:
-
DESTROY
An entry distributed destroy.- See Also:
-
LOCAL_DESTROY
An entry local destroy.- See Also:
-
EVICT_DESTROY
An entry local destroy caused by an eviction.- See Also:
-
REGION_LOAD_SNAPSHOT
A region load snapshot.- See Also:
-
REGION_LOCAL_DESTROY
A region local destroy.- See Also:
-
REGION_CREATE
A region create. -
REGION_CLOSE
A region close- See Also:
-
REGION_DESTROY
A region distributed destroy.- See Also:
-
EXPIRE_DESTROY
An entry distributed destroy triggered by expiration -
EXPIRE_LOCAL_DESTROY
An entry local destroy triggered by expiration -
EXPIRE_INVALIDATE
An entry distributed invalidate triggered by expiration -
EXPIRE_LOCAL_INVALIDATE
An entry local invalidate triggered by expiration -
REGION_EXPIRE_DESTROY
A region distributed destroy triggered by expiration -
REGION_EXPIRE_LOCAL_DESTROY
A region local destroy triggered by expiration -
REGION_EXPIRE_INVALIDATE
A region distributed invalidate triggered by expiration -
REGION_EXPIRE_LOCAL_INVALIDATE
A region local invalidate triggered by expiration -
REGION_LOCAL_INVALIDATE
A region local invalidate.- See Also:
-
REGION_INVALIDATE
A region distributed invalidate.- See Also:
-
REGION_CLEAR
A region clear.- See Also:
-
REGION_LOCAL_CLEAR
A region local clear.- See Also:
-
CACHE_CREATE
A cache create. Note that this is marked as a region operation.- See Also:
-
CACHE_CLOSE
A cache close. Note that this is marked as a region operation.- See Also:
-
FORCED_DISCONNECT
A cache close due to being forced out of the distributed system by other members. This typically happens when a member becomes unresponsive and does not respond to heartbeat requests within the "member-timeout" period.
Note that this is marked as a region operation. -
REGION_REINITIALIZE
A region destroy triggered byResumptionAction.REINITIALIZE.- See Also:
-
CACHE_RECONNECT
A cache close triggered byLossAction.RECONNECT.- See Also:
-
PUT_IF_ABSENT
An atomic entry creation operation- Since:
- GemFire 6.5
- See Also:
-
REPLACE
An atomic update operation- Since:
- GemFire 6.5
- See Also:
-
REMOVE
An atomic destroy destroy operation- Since:
- GemFire 6.5
- See Also:
-
UPDATE_VERSION_STAMP
An internal operation used to update the version stamp of an entry. -
REMOVEALL_DESTROY
An entry distributed destroy caused by a removeAll.- Since:
- GemFire 8.1
- See Also:
-
GET_FOR_REGISTER_INTEREST
A 'get for register interest' operation. -
ordinal
public final byte ordinalbyte used as ordinal to represent this Operation
-
-
Method Details
-
fromOrdinal
Return the Operation represented by specified ordinal- Parameters:
ordinal- the ordinal representation of an Operation- Returns:
- the Operation represented by specified ordinal
-
isCreate
public boolean isCreate()Returns true if this operation created a new entry.- Returns:
- whether this operation created a new entry
-
isUpdate
public boolean isUpdate()Returns true if this operation updated an existing entry.- Returns:
- whether this operation updated an existing entry
-
isGet
public boolean isGet()Returns true if this operation gets the value for given key.- Returns:
- whether this operation gets the value for given key
-
isContainsKey
public boolean isContainsKey()Returns true if this operation checks whether given key is present in region.- Returns:
- whether this operation checks whether given key is present in region
-
isContainsValue
public boolean isContainsValue()Returns true if this operation checks whether given value is present in region.- Returns:
- whether this operation checks whether given value is present in region
-
isContainsValueForKey
public boolean isContainsValueForKey()Returns true if this operation checks whether value is present for the given key.- Returns:
- whether this operation checks whether value is present for the given key
-
isFunctionExecution
public boolean isFunctionExecution()Returns true if this operation is function execution operation.- Returns:
- whether this operation is function execution operation
-
isGetEntry
public boolean isGetEntry()Returns true if this operation gets the entry for given key.- Returns:
- whether this operation gets the entry for given key
-
isGetForRegisterInterest
public boolean isGetForRegisterInterest()Returns true if this operation is a get for register interest.- Returns:
- whether this operation is a get for register interest
-
isInvalidate
public boolean isInvalidate()Returns true if the operation invalidated an entry.- Returns:
- whether the operation invalidated an entry
-
isDestroy
public boolean isDestroy()Returns true if the operation destroyed an entry.- Returns:
- whether the operation destroyed an entry
-
isClear
public boolean isClear()Returns true if the operation cleared the region.- Returns:
- whether the operation cleared the region
-
isClose
public boolean isClose()Returns true if the operation closed the cache or a region.- Returns:
- whether the operation closed the cache or a region
-
isPutAll
public boolean isPutAll()Returns true if this operation was initiated by a putAll.- Returns:
- whether this operation was initiated by a putAll
-
isRemoveAll
public boolean isRemoveAll()Returns true if this operation was initiated by a removeAll.- Returns:
- whether this operation was initiated by a removeAll
- Since:
- GemFire 8.1
- See Also:
-
isRegionInvalidate
public boolean isRegionInvalidate()Returns true if the operation invalidated a region.- Returns:
- whether the operation invalidated a region
-
isRegionDestroy
public boolean isRegionDestroy()Returns true if the operation destroyed a region.- Returns:
- whether the operation destroyed a region
-
isRegion
public boolean isRegion()Returns true if the operation applies to the entire region.- Returns:
- whether the operation applies to the entire region
-
isLocal
public boolean isLocal()Returns true if the operation is limited to the local cache.- Returns:
- whether the operation is limited to the local cache
-
isDistributed
public boolean isDistributed()Returns true if the operation may be distributed.- Returns:
- whether the operation may be distributed
-
isEntry
public boolean isEntry()Returns true if the operation applies to a single entry.- Returns:
- whether the operation applies to a single entry
-
isExpiration
public boolean isExpiration()Answer true if this operation resulted from expiration.- Returns:
- true if this operation resulted from expiration
-
isEviction
public boolean isEviction()Answer true if this operation resulted from eviction- Returns:
- true if this operatino resulted from eviction
-
isLocalLoad
public boolean isLocalLoad()Returns true if this operation included a loader running in this cache. Note that this will be true even if the local loader callednetSearch. If this operation is for a Partitioned Region, then true will be returned if the loader ran in the same VM as where the data is hosted. If true is returned, andCacheEvent.isOriginRemote()is true, it means the data is not hosted locally, but the loader was run local to the data.- Returns:
- true if this operation included a local loader execution
-
isNetLoad
public boolean isNetLoad()Returns true if this operation included a loader running that was remote from the cache that requested it, i.e., a netLoad. Note that the cache that requested the netLoad may not be this cache.- Returns:
- true if this operation included a netLoad
-
isLoad
public boolean isLoad()Returns true if this operation included running a loader.- Returns:
- true if isLocalLoad or isNetLoad
-
isNetSearch
public boolean isNetSearch()Returns true if this operation included anetSearch. If thenetSearchwas invoked by a loader however, this will return false andisLocalLoad()orisNetLoad()will return true instead.- Returns:
- true if this operation included a netSearch
-
isSearchOrLoad
public boolean isSearchOrLoad()Returns true if this operation was anet searchor aload.- Returns:
- true if this operation include a netSearch or any type of load.
-
guaranteesOldValue
public boolean guaranteesOldValue()Returns true if this operation is a ConcurrentMap operation that guarantees the old value to be returned no matter what expense may be incurred in doing so.- Returns:
- true if this operation has this guarantee
- Since:
- GemFire 6.5
-
getCorrespondingUpdateOp
Returns the update operation that corresponds to this operation. For a create operation the corresponding update op is returned. For all other operationsthisis returned.- Returns:
- the update operation that corresponds to this operation
-
getCorrespondingCreateOp
Returns the create operation that corresponds to this operation. For an update operation the corresponding create op is returned. For all other operationsthisis returned.- Returns:
- the create operation that corresponds to this operation
-
toString
Returns a string representation for this operation.
-