Class AbstractInvocationContext

java.lang.Object
org.infinispan.context.impl.AbstractInvocationContext
All Implemented Interfaces:
Cloneable, EntryLookup, InvocationContext
Direct Known Subclasses:
AbstractTxInvocationContext, ClearInvocationContext, NonTxInvocationContext

public abstract class AbstractInvocationContext extends Object implements InvocationContext
Common features of transaction and invocation contexts
Since:
4.0
Author:
Manik Surtani, Mircea.Markus@jboss.com
  • Constructor Details

    • AbstractInvocationContext

      protected AbstractInvocationContext(Address origin)
  • Method Details

    • getOrigin

      public final Address getOrigin()
      Specified by:
      getOrigin in interface InvocationContext
      Returns:
      the origin of the command, or null if the command originated locally
    • isOriginLocal

      public boolean isOriginLocal()
      Description copied from interface: InvocationContext
      Returns true if the call was originated locally, false if it is the result of a remote rpc.
      Specified by:
      isOriginLocal in interface InvocationContext
    • hasLockedKey

      public boolean hasLockedKey(Object key)
      Description copied from interface: InvocationContext
      Returns true if the lock being tested is already held in the current scope, false otherwise.
      Specified by:
      hasLockedKey in interface InvocationContext
      Parameters:
      key - lock to test
    • isEntryRemovedInContext

      public boolean isEntryRemovedInContext(Object key)
      Specified by:
      isEntryRemovedInContext in interface InvocationContext
    • clone

      public InvocationContext clone()
      Description copied from interface: InvocationContext
      Clones the invocation context.
      Specified by:
      clone in interface InvocationContext
      Overrides:
      clone in class Object
      Returns:
      A cloned instance of this invocation context instance
    • publisher

      public <K, V> org.reactivestreams.Publisher<CacheEntry<K,V>> publisher()
      Description copied from interface: EntryLookup
      Returns a Publisher that when subscribed to provide all values that have a value in the given context.
      Specified by:
      publisher in interface EntryLookup
      Type Parameters:
      K - key type provided from user
      V - value type provided from user
      Returns: