org.infinispan.container
Interface EntryFactory

All Known Implementing Classes:
EntryFactoryImpl, IncrementalVersionableEntryFactoryImpl

public interface EntryFactory

A factory for constructing MVCCEntry instances for use in the InvocationContext. Implementations of this interface would typically wrap an internal CacheEntry with an MVCCEntry, optionally acquiring the necessary locks via the LockManager.

Since:
4.0
Author:
Manik Surtani (manik@jboss.org), Galder ZamarreƱo, Mircea.Markus@jboss.com

Method Summary
 MVCCEntry wrapEntryForClear(InvocationContext ctx, Object key)
          Used for wrapping individual keys when clearing the cache.
 CacheEntry wrapEntryForDelta(InvocationContext ctx, Object deltaKey, Delta delta)
          Used for wrapping Delta entry to be applied to DeltaAware object stored in cache.
 MVCCEntry wrapEntryForPut(InvocationContext ctx, Object key, InternalCacheEntry ice, boolean undeleteIfNeeded)
          Used for wrapping a cache entry for addition to cache.
 CacheEntry wrapEntryForReading(InvocationContext ctx, Object key)
          Wraps an entry for reading.
 MVCCEntry wrapEntryForRemove(InvocationContext ctx, Object key)
          Used for wrapping a cache entry for removal.
 MVCCEntry wrapEntryForReplace(InvocationContext ctx, Object key)
          Used for wrapping a cache entry for replacement.
 

Method Detail

wrapEntryForReading

CacheEntry wrapEntryForReading(InvocationContext ctx,
                               Object key)
                               throws InterruptedException
Wraps an entry for reading. Usually this is just a raw CacheEntry but certain combinations of isolation levels and the presence of an ongoing JTA transaction may force this to be a proper, wrapped MVCCEntry. The entry is also typically placed in the invocation context.

Parameters:
ctx - current invocation context
key - key to look up and wrap
Throws:
InterruptedException - when things go wrong, usually trying to acquire a lock

wrapEntryForClear

MVCCEntry wrapEntryForClear(InvocationContext ctx,
                            Object key)
                            throws InterruptedException
Used for wrapping individual keys when clearing the cache. The wrapped entry is added to the supplied InvocationContext.

Throws:
InterruptedException

wrapEntryForReplace

MVCCEntry wrapEntryForReplace(InvocationContext ctx,
                              Object key)
                              throws InterruptedException
Used for wrapping a cache entry for replacement. The wrapped entry is added to the supplied InvocationContext.

Throws:
InterruptedException

wrapEntryForRemove

MVCCEntry wrapEntryForRemove(InvocationContext ctx,
                             Object key)
                             throws InterruptedException
Used for wrapping a cache entry for removal. The wrapped entry is added to the supplied InvocationContext.

Throws:
InterruptedException

wrapEntryForDelta

CacheEntry wrapEntryForDelta(InvocationContext ctx,
                             Object deltaKey,
                             Delta delta)
                             throws InterruptedException
Used for wrapping Delta entry to be applied to DeltaAware object stored in cache. The wrapped entry is added to the supplied InvocationContext.

Throws:
InterruptedException

wrapEntryForPut

MVCCEntry wrapEntryForPut(InvocationContext ctx,
                          Object key,
                          InternalCacheEntry ice,
                          boolean undeleteIfNeeded)
                          throws InterruptedException
Used for wrapping a cache entry for addition to cache. The wrapped entry is added to the supplied InvocationContext.

Throws:
InterruptedException

-->

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