VMware GemFire Java API Reference
Package org.apache.geode.cache
Class Operation
- java.lang.Object
-
- org.apache.geode.cache.Operation
-
- All Implemented Interfaces:
java.io.Serializable
@Immutable public class Operation extends java.lang.Object implements java.io.Serializable
Enumerated type for an event operation. This class describes the operation that generated the event.- Since:
- GemFire 5.0
- See Also:
CacheEvent.getOperation(), Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static OperationCACHE_CLOSEA cache close.static OperationCACHE_CREATEA cache create.static OperationCACHE_RECONNECTA cache close triggered byLossAction.RECONNECT.static OperationCONTAINS_KEYA 'check for existence of key' operation.static OperationCONTAINS_VALUEA 'check for existence of value' operation.static OperationCONTAINS_VALUE_FOR_KEYA 'check for existence of value for given key' operation.static OperationCREATEAn entry creation.static OperationDESTROYAn entry distributed destroy.static OperationEVICT_DESTROYAn entry local destroy caused by an eviction.static OperationEXPIRE_DESTROYAn entry distributed destroy triggered by expirationstatic OperationEXPIRE_INVALIDATEAn entry distributed invalidate triggered by expirationstatic OperationEXPIRE_LOCAL_DESTROYAn entry local destroy triggered by expirationstatic OperationEXPIRE_LOCAL_INVALIDATEAn entry local invalidate triggered by expirationstatic OperationFORCED_DISCONNECTA cache close due to being forced out of the distributed system by other members.static OperationFUNCTION_EXECUTIONA 'function execution' operation.static OperationGETA 'value for key' operation.static OperationGET_ENTRYA 'entry for key' operation.static OperationGET_FOR_REGISTER_INTERESTA 'get for register interest' operation.static OperationINVALIDATEAn entry distributed invalidate.static OperationLOCAL_DESTROYAn entry local destroy.static OperationLOCAL_INVALIDATEAn entry local invalidate.static OperationLOCAL_LOAD_CREATEAn entry creation caused by a local loaderstatic OperationLOCAL_LOAD_UPDATEAn entry update caused by a local load.static OperationMARKERA marker operation.static OperationNET_LOAD_CREATEAn entry creation caused by a net loaderstatic OperationNET_LOAD_UPDATEAn entry update caused by a net load.byteordinalbyte used as ordinal to represent this Operationstatic OperationPUT_IF_ABSENTAn atomic entry creation operationstatic OperationPUTALL_CREATEAn entry creation caused by a putAll invocationstatic OperationPUTALL_UPDATEAn entry update caused by a putAll invocation.static OperationREGION_CLEARA region clear.static OperationREGION_CLOSEA region closestatic OperationREGION_CREATEA region create.static OperationREGION_DESTROYA region distributed destroy.static OperationREGION_EXPIRE_DESTROYA region distributed destroy triggered by expirationstatic OperationREGION_EXPIRE_INVALIDATEA region distributed invalidate triggered by expirationstatic OperationREGION_EXPIRE_LOCAL_DESTROYA region local destroy triggered by expirationstatic OperationREGION_EXPIRE_LOCAL_INVALIDATEA region local invalidate triggered by expirationstatic OperationREGION_INVALIDATEA region distributed invalidate.static OperationREGION_LOAD_SNAPSHOTA region load snapshot.static OperationREGION_LOCAL_CLEARA region local clear.static OperationREGION_LOCAL_DESTROYA region local destroy.static OperationREGION_LOCAL_INVALIDATEA region local invalidate.static OperationREGION_REINITIALIZEA region destroy triggered byResumptionAction.REINITIALIZE.static OperationREMOVEAn atomic destroy destroy operationstatic OperationREMOVEALL_DESTROYAn entry distributed destroy caused by a removeAll.static OperationREPLACEAn atomic update operationstatic OperationSEARCH_CREATEAn entry creation caused by a netsearchstatic OperationSEARCH_UPDATEAn entry update caused by a net search.static OperationUPDATEAn entry update.static OperationUPDATE_VERSION_STAMPAn internal operation used to update the version stamp of an entry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperationfromOrdinal(byte ordinal)Return the Operation represented by specified ordinalOperationgetCorrespondingCreateOp()Returns the create operation that corresponds to this operation.OperationgetCorrespondingUpdateOp()Returns the update operation that corresponds to this operation.booleanguaranteesOldValue()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.booleanisClear()Returns true if the operation cleared the region.booleanisClose()Returns true if the operation closed the cache or a region.booleanisContainsKey()Returns true if this operation checks whether given key is present in region.booleanisContainsValue()Returns true if this operation checks whether given value is present in region.booleanisContainsValueForKey()Returns true if this operation checks whether value is present for the given key.booleanisCreate()Returns true if this operation created a new entry.booleanisDestroy()Returns true if the operation destroyed an entry.booleanisDistributed()Returns true if the operation may be distributed.booleanisEntry()Returns true if the operation applies to a single entry.booleanisEviction()Answer true if this operation resulted from evictionbooleanisExpiration()Answer true if this operation resulted from expiration.booleanisFunctionExecution()Returns true if this operation is function execution operation.booleanisGet()Returns true if this operation gets the value for given key.booleanisGetEntry()Returns true if this operation gets the entry for given key.booleanisGetForRegisterInterest()Returns true if this operation is a get for register interest.booleanisInvalidate()Returns 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.booleanisLocalLoad()Returns true if this operation included a loader running in this cache.booleanisNetLoad()Returns true if this operation included a loader running that was remote from the cache that requested it, i.e., a netLoad.booleanisNetSearch()Returns 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.booleanisRegionDestroy()Returns true if the operation destroyed a region.booleanisRegionInvalidate()Returns true if the operation invalidated a region.booleanisRemoveAll()Returns true if this operation was initiated by a removeAll.booleanisSearchOrLoad()Returns true if this operation was anet searchor aload.booleanisUpdate()Returns true if this operation updated an existing entry.java.lang.StringtoString()Returns a string representation for this operation.
-
-
-
Field Detail
-
MARKER
@Immutable public static final Operation MARKER
A marker operation.
-
CREATE
@Immutable public static final Operation CREATE
An entry creation.- See Also:
Region.create(Object, Object)
-
PUTALL_CREATE
@Immutable public static final Operation PUTALL_CREATE
An entry creation caused by a putAll invocation
-
GET
@Immutable public static final Operation GET
A 'value for key' operation.- See Also:
Region.get(Object)
-
GET_ENTRY
@Immutable public static final Operation GET_ENTRY
A 'entry for key' operation.- See Also:
Region.getEntry(Object)
-
CONTAINS_KEY
@Immutable public static final Operation CONTAINS_KEY
A 'check for existence of key' operation.- See Also:
Region.containsKey(Object)
-
CONTAINS_VALUE
@Immutable public static final Operation CONTAINS_VALUE
A 'check for existence of value' operation.- See Also:
Region.containsValueForKey(Object)
-
CONTAINS_VALUE_FOR_KEY
@Immutable public static final Operation CONTAINS_VALUE_FOR_KEY
A 'check for existence of value for given key' operation.- See Also:
Region.containsValueForKey(Object)
-
FUNCTION_EXECUTION
@Immutable public static final Operation FUNCTION_EXECUTION
A 'function execution' operation.- See Also:
FunctionService
-
SEARCH_CREATE
@Immutable public static final Operation SEARCH_CREATE
An entry creation caused by a netsearch- See Also:
Region.get(Object)
-
LOCAL_LOAD_CREATE
@Immutable public static final Operation LOCAL_LOAD_CREATE
An entry creation caused by a local loader- See Also:
Region.get(Object),CacheLoader
-
NET_LOAD_CREATE
@Immutable public static final Operation NET_LOAD_CREATE
An entry creation caused by a net loader- See Also:
Region.get(Object),CacheLoader
-
UPDATE
@Immutable public static final Operation UPDATE
An entry update.- See Also:
Region.put(Object, Object)
-
PUTALL_UPDATE
@Immutable public static final Operation PUTALL_UPDATE
An entry update caused by a putAll invocation.
-
SEARCH_UPDATE
@Immutable public static final Operation SEARCH_UPDATE
An entry update caused by a net search.- See Also:
Region.get(Object)
-
LOCAL_LOAD_UPDATE
@Immutable public static final Operation LOCAL_LOAD_UPDATE
An entry update caused by a local load.- See Also:
Region.get(Object),CacheLoader
-
NET_LOAD_UPDATE
@Immutable public static final Operation NET_LOAD_UPDATE
An entry update caused by a net load.- See Also:
Region.get(Object),CacheLoader
-
INVALIDATE
@Immutable public static final Operation INVALIDATE
An entry distributed invalidate.- See Also:
Region.invalidate(Object)
-
LOCAL_INVALIDATE
@Immutable public static final Operation LOCAL_INVALIDATE
An entry local invalidate.- See Also:
Region.localInvalidate(Object)
-
DESTROY
@Immutable public static final Operation DESTROY
An entry distributed destroy.- See Also:
Region.destroy(Object)
-
LOCAL_DESTROY
@Immutable public static final Operation LOCAL_DESTROY
An entry local destroy.- See Also:
Region.localDestroy(Object)
-
EVICT_DESTROY
@Immutable public static final Operation EVICT_DESTROY
An entry local destroy caused by an eviction.- See Also:
Region.localDestroy(Object)
-
REGION_LOAD_SNAPSHOT
@Immutable public static final Operation REGION_LOAD_SNAPSHOT
A region load snapshot.- See Also:
Region.loadSnapshot(java.io.InputStream)
-
REGION_LOCAL_DESTROY
@Immutable public static final Operation REGION_LOCAL_DESTROY
A region local destroy.- See Also:
Region.localDestroyRegion()
-
REGION_CREATE
@Immutable public static final Operation REGION_CREATE
A region create.
-
REGION_CLOSE
@Immutable public static final Operation REGION_CLOSE
A region close- See Also:
Region.close()
-
REGION_DESTROY
@Immutable public static final Operation REGION_DESTROY
A region distributed destroy.- See Also:
Region.destroyRegion()
-
EXPIRE_DESTROY
@Immutable public static final Operation EXPIRE_DESTROY
An entry distributed destroy triggered by expiration
-
EXPIRE_LOCAL_DESTROY
@Immutable public static final Operation EXPIRE_LOCAL_DESTROY
An entry local destroy triggered by expiration
-
EXPIRE_INVALIDATE
@Immutable public static final Operation EXPIRE_INVALIDATE
An entry distributed invalidate triggered by expiration
-
EXPIRE_LOCAL_INVALIDATE
@Immutable public static final Operation EXPIRE_LOCAL_INVALIDATE
An entry local invalidate triggered by expiration
-
REGION_EXPIRE_DESTROY
@Immutable public static final Operation REGION_EXPIRE_DESTROY
A region distributed destroy triggered by expiration
-
REGION_EXPIRE_LOCAL_DESTROY
@Immutable public static final Operation REGION_EXPIRE_LOCAL_DESTROY
A region local destroy triggered by expiration
-
REGION_EXPIRE_INVALIDATE
@Immutable public static final Operation REGION_EXPIRE_INVALIDATE
A region distributed invalidate triggered by expiration
-
REGION_EXPIRE_LOCAL_INVALIDATE
@Immutable public static final Operation REGION_EXPIRE_LOCAL_INVALIDATE
A region local invalidate triggered by expiration
-
REGION_LOCAL_INVALIDATE
@Immutable public static final Operation REGION_LOCAL_INVALIDATE
A region local invalidate.- See Also:
Region.localInvalidateRegion()
-
REGION_INVALIDATE
@Immutable public static final Operation REGION_INVALIDATE
A region distributed invalidate.- See Also:
Region.invalidateRegion()
-
REGION_CLEAR
@Immutable public static final Operation REGION_CLEAR
A region clear.- See Also:
Region.clear()
-
REGION_LOCAL_CLEAR
@Immutable public static final Operation REGION_LOCAL_CLEAR
A region local clear.- See Also:
Region.localClear()
-
CACHE_CREATE
@Immutable public static final Operation CACHE_CREATE
A cache create. Note that this is marked as a region operation.- See Also:
CacheFactory.create()
-
CACHE_CLOSE
@Immutable public static final Operation CACHE_CLOSE
A cache close. Note that this is marked as a region operation.- See Also:
RegionService.close()
-
FORCED_DISCONNECT
@Immutable public static final Operation 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
@Immutable public static final Operation REGION_REINITIALIZE
A region destroy triggered byResumptionAction.REINITIALIZE.- See Also:
ResumptionAction.REINITIALIZE
-
CACHE_RECONNECT
@Immutable public static final Operation CACHE_RECONNECT
A cache close triggered byLossAction.RECONNECT.- See Also:
LossAction.RECONNECT
-
PUT_IF_ABSENT
@Immutable public static final Operation PUT_IF_ABSENT
An atomic entry creation operation- Since:
- GemFire 6.5
- See Also:
ConcurrentMap.putIfAbsent(Object, Object)
-
REPLACE
@Immutable public static final Operation REPLACE
An atomic update operation- Since:
- GemFire 6.5
- See Also:
ConcurrentMap.replace(Object, Object, Object)
-
REMOVE
@Immutable public static final Operation REMOVE
An atomic destroy destroy operation- Since:
- GemFire 6.5
- See Also:
ConcurrentMap.remove(Object, Object)
-
UPDATE_VERSION_STAMP
@Immutable public static final Operation UPDATE_VERSION_STAMP
An internal operation used to update the version stamp of an entry.
-
REMOVEALL_DESTROY
@Immutable public static final Operation REMOVEALL_DESTROY
An entry distributed destroy caused by a removeAll.- Since:
- GemFire 8.1
- See Also:
Region.removeAll(java.util.Collection)
-
GET_FOR_REGISTER_INTEREST
@Immutable public static final Operation GET_FOR_REGISTER_INTEREST
A 'get for register interest' operation.
-
ordinal
public final byte ordinal
byte used as ordinal to represent this Operation
-
-
Method Detail
-
fromOrdinal
public static Operation fromOrdinal(byte ordinal)
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:
Region.removeAll(java.util.Collection)
-
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
public Operation 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
public 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
public java.lang.String toString()
Returns a string representation for this operation.- Overrides:
toStringin classjava.lang.Object- Returns:
- the name of this operation.
-
-