org.infinispan.context
Interface EntryLookup

All Known Subinterfaces:
InvocationContext, TxInvocationContext
All Known Implementing Classes:
AbstractInvocationContext, AbstractTxInvocationContext, InvocationContextFlagsOverride, LocalTxInvocationContext, NonTxInvocationContext, RemoteTxInvocationContext, TransactionalInvocationContextFlagsOverride

public interface EntryLookup

Interface that can look up MVCC wrapped entries.

Since:
4.0
Author:
Manik Surtani (manik@jboss.org)

Method Summary
 void clearLookedUpEntries()
          Clears the collection of entries looked up
 BidirectionalMap<Object,CacheEntry> getLookedUpEntries()
          Retrieves a map of entries looked up within the current scope.
 boolean hasLockedKey(Object key)
          Using this method should always ensure locks checked in the appropriate scope.
 CacheEntry lookupEntry(Object key)
          Retrieves an entry from the collection of looked up entries in the current scope.
 void putLookedUpEntries(Map<Object,CacheEntry> lookedUpEntries)
           
 void putLookedUpEntry(Object key, CacheEntry e)
          Puts an entry in the registry of looked up entries in the current scope.
 void removeLookedUpEntry(Object key)
           
 

Method Detail

lookupEntry

CacheEntry lookupEntry(Object key)
Retrieves an entry from the collection of looked up entries in the current scope.

Parameters:
key - key to look up
Returns:
an entry, or null if it cannot be found.

getLookedUpEntries

BidirectionalMap<Object,CacheEntry> getLookedUpEntries()
Retrieves a map of entries looked up within the current scope.

Returns:
a map of looked up entries.

putLookedUpEntry

void putLookedUpEntry(Object key,
                      CacheEntry e)
Puts an entry in the registry of looked up entries in the current scope.

Parameters:
key - key to store
e - entry to store

putLookedUpEntries

void putLookedUpEntries(Map<Object,CacheEntry> lookedUpEntries)

removeLookedUpEntry

void removeLookedUpEntry(Object key)

clearLookedUpEntries

void clearLookedUpEntries()
Clears the collection of entries looked up


hasLockedKey

boolean hasLockedKey(Object key)
Using this method should always ensure locks checked in the appropriate scope.

Parameters:
key - lock to test
Returns:
true if the lock being tested is already held in the current scope, false otherwise.


Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.