Gemfire JavaDocs_test
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 Operation
CACHE_CLOSE
A cache close.static Operation
CACHE_CREATE
A cache create.static Operation
CACHE_RECONNECT
A cache close triggered byLossAction.RECONNECT
.static Operation
CONTAINS_KEY
A 'check for existence of key' operation.static Operation
CONTAINS_VALUE
A 'check for existence of value' operation.static Operation
CONTAINS_VALUE_FOR_KEY
A 'check for existence of value for given key' operation.static Operation
CREATE
An entry creation.static Operation
DESTROY
An entry distributed destroy.static Operation
EVICT_DESTROY
An entry local destroy caused by an eviction.static Operation
EXPIRE_DESTROY
An entry distributed destroy triggered by expirationstatic Operation
EXPIRE_INVALIDATE
An entry distributed invalidate triggered by expirationstatic Operation
EXPIRE_LOCAL_DESTROY
An entry local destroy triggered by expirationstatic Operation
EXPIRE_LOCAL_INVALIDATE
An entry local invalidate triggered by expirationstatic Operation
FORCED_DISCONNECT
A cache close due to being forced out of the distributed system by other members.static Operation
FUNCTION_EXECUTION
A 'function execution' operation.static Operation
GET
A 'value for key' operation.static Operation
GET_ENTRY
A 'entry for key' operation.static Operation
GET_FOR_REGISTER_INTEREST
A 'get for register interest' operation.static Operation
INVALIDATE
An entry distributed invalidate.static Operation
LOCAL_DESTROY
An entry local destroy.static Operation
LOCAL_INVALIDATE
An entry local invalidate.static Operation
LOCAL_LOAD_CREATE
An entry creation caused by a local loaderstatic Operation
LOCAL_LOAD_UPDATE
An entry update caused by a local load.static Operation
MARKER
A marker operation.static Operation
NET_LOAD_CREATE
An entry creation caused by a net loaderstatic Operation
NET_LOAD_UPDATE
An entry update caused by a net load.byte
ordinal
byte used as ordinal to represent this Operationstatic Operation
PUT_IF_ABSENT
An atomic entry creation operationstatic Operation
PUTALL_CREATE
An entry creation caused by a putAll invocationstatic Operation
PUTALL_UPDATE
An entry update caused by a putAll invocation.static Operation
REGION_CLEAR
A region clear.static Operation
REGION_CLOSE
A region closestatic Operation
REGION_CREATE
A region create.static Operation
REGION_DESTROY
A region distributed destroy.static Operation
REGION_EXPIRE_DESTROY
A region distributed destroy triggered by expirationstatic Operation
REGION_EXPIRE_INVALIDATE
A region distributed invalidate triggered by expirationstatic Operation
REGION_EXPIRE_LOCAL_DESTROY
A region local destroy triggered by expirationstatic Operation
REGION_EXPIRE_LOCAL_INVALIDATE
A region local invalidate triggered by expirationstatic Operation
REGION_INVALIDATE
A region distributed invalidate.static Operation
REGION_LOAD_SNAPSHOT
A region load snapshot.static Operation
REGION_LOCAL_CLEAR
A region local clear.static Operation
REGION_LOCAL_DESTROY
A region local destroy.static Operation
REGION_LOCAL_INVALIDATE
A region local invalidate.static Operation
REGION_REINITIALIZE
A region destroy triggered byResumptionAction.REINITIALIZE
.static Operation
REMOVE
An atomic destroy destroy operationstatic Operation
REMOVEALL_DESTROY
An entry distributed destroy caused by a removeAll.static Operation
REPLACE
An atomic update operationstatic Operation
SEARCH_CREATE
An entry creation caused by a netsearchstatic Operation
SEARCH_UPDATE
An entry update caused by a net search.static Operation
UPDATE
An entry update.static Operation
UPDATE_VERSION_STAMP
An 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 Operation
fromOrdinal(byte ordinal)
Return the Operation represented by specified ordinalOperation
getCorrespondingCreateOp()
Returns the create operation that corresponds to this operation.Operation
getCorrespondingUpdateOp()
Returns the update operation that corresponds to this operation.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.boolean
isClear()
Returns true if the operation cleared the region.boolean
isClose()
Returns true if the operation closed the cache or a region.boolean
isContainsKey()
Returns true if this operation checks whether given key is present in region.boolean
isContainsValue()
Returns true if this operation checks whether given value is present in region.boolean
isContainsValueForKey()
Returns true if this operation checks whether value is present for the given key.boolean
isCreate()
Returns true if this operation created a new entry.boolean
isDestroy()
Returns true if the operation destroyed an entry.boolean
isDistributed()
Returns true if the operation may be distributed.boolean
isEntry()
Returns true if the operation applies to a single entry.boolean
isEviction()
Answer true if this operation resulted from evictionboolean
isExpiration()
Answer true if this operation resulted from expiration.boolean
isFunctionExecution()
Returns true if this operation is function execution operation.boolean
isGet()
Returns true if this operation gets the value for given key.boolean
isGetEntry()
Returns true if this operation gets the entry for given key.boolean
isGetForRegisterInterest()
Returns true if this operation is a get for register interest.boolean
isInvalidate()
Returns true if the operation invalidated an entry.boolean
isLoad()
Returns true if this operation included running a loader.boolean
isLocal()
Returns true if the operation is limited to the local cache.boolean
isLocalLoad()
Returns true if this operation included a loader running in this cache.boolean
isNetLoad()
Returns true if this operation included a loader running that was remote from the cache that requested it, i.e., a netLoad.boolean
isNetSearch()
Returns true if this operation included anetSearch
.boolean
isPutAll()
Returns true if this operation was initiated by a putAll.boolean
isRegion()
Returns true if the operation applies to the entire region.boolean
isRegionDestroy()
Returns true if the operation destroyed a region.boolean
isRegionInvalidate()
Returns true if the operation invalidated a region.boolean
isRemoveAll()
Returns true if this operation was initiated by a removeAll.boolean
isSearchOrLoad()
Returns true if this operation was anet search
or aload
.boolean
isUpdate()
Returns true if this operation updated an existing entry.java.lang.String
toString()
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 thenetSearch
was 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 search
or 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 operationsthis
is 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 operationsthis
is returned.- Returns:
- the create operation that corresponds to this operation
-
toString
public java.lang.String toString()
Returns a string representation for this operation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the name of this operation.
-
-