Class Operation

java.lang.Object
org.apache.geode.cache.Operation
All Implemented Interfaces:
Serializable

@Immutable public class Operation extends Object implements Serializable
Enumerated type for an event operation. This class describes the operation that generated the event.
Since:
GemFire 5.0
See Also:
  • Field Details

  • Method Details

    • 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:
    • 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 called netSearch. 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, and CacheEvent.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 a netSearch. If the netSearch was invoked by a loader however, this will return false and isLocalLoad() or isNetLoad() will return true instead.
      Returns:
      true if this operation included a netSearch
    • isSearchOrLoad

      public boolean isSearchOrLoad()
      Returns true if this operation was a net search or a load.
      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 operations this 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 operations this is returned.
      Returns:
      the create operation that corresponds to this operation
    • toString

      public String toString()
      Returns a string representation for this operation.
      Overrides:
      toString in class Object
      Returns:
      the name of this operation.