|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.container.EntryFactoryImpl
public class EntryFactoryImpl
Constructor Summary | |
---|---|
EntryFactoryImpl()
|
Method Summary | |
---|---|
boolean |
acquireLock(InvocationContext ctx,
Object key)
Attempts to lock an entry if the lock isn't already held in the current scope, and records the lock in the context. |
void |
init()
|
void |
injectDependencies(DataContainer dataContainer,
LockManager lockManager,
Configuration configuration,
CacheNotifier notifier)
|
void |
releaseLock(Object key)
|
CacheEntry |
wrapEntryForReading(InvocationContext ctx,
Object key)
Wraps an entry for reading. |
MVCCEntry |
wrapEntryForWriting(InvocationContext ctx,
InternalCacheEntry entry,
boolean createIfAbsent,
boolean forceLockIfAbsent,
boolean alreadyLocked,
boolean forRemoval,
boolean undeleteIfNeeded)
Wraps an entry for writing. |
MVCCEntry |
wrapEntryForWriting(InvocationContext ctx,
Object key,
boolean createIfAbsent,
boolean forceLockIfAbsent,
boolean alreadyLocked,
boolean forRemoval,
boolean undeleteIfNeeded)
Wraps an entry for writing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntryFactoryImpl()
Method Detail |
---|
public void injectDependencies(DataContainer dataContainer, LockManager lockManager, Configuration configuration, CacheNotifier notifier)
public void init()
public final CacheEntry wrapEntryForReading(InvocationContext ctx, Object key) throws InterruptedException
EntryFactory
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.
wrapEntryForReading
in interface EntryFactory
ctx
- current invocation contextkey
- key to look up and wrap
InterruptedException
- when things go wrong, usually trying to acquire a lockpublic final MVCCEntry wrapEntryForWriting(InvocationContext ctx, Object key, boolean createIfAbsent, boolean forceLockIfAbsent, boolean alreadyLocked, boolean forRemoval, boolean undeleteIfNeeded) throws InterruptedException
EntryFactory
wrapEntryForWriting
in interface EntryFactory
ctx
- current invocation contextkey
- key to look up and wrapcreateIfAbsent
- if true, an entry is created if it does not exist in the data container.forceLockIfAbsent
- forces a lock even if the entry is absentalreadyLocked
- if true, this hint prevents the method from acquiring any locks and the existence and ownership of the lock is presumed.forRemoval
- if true, this hint informs this method that the lock is being acquired for removal.undeleteIfNeeded
- if true, if the entry is found in the current scope (perhaps a transaction) and is deleted, it will be undeleted. If false, it will be considered deleted.
InterruptedException
- when things go wrong, usually trying to acquire a lockpublic MVCCEntry wrapEntryForWriting(InvocationContext ctx, InternalCacheEntry entry, boolean createIfAbsent, boolean forceLockIfAbsent, boolean alreadyLocked, boolean forRemoval, boolean undeleteIfNeeded) throws InterruptedException
EntryFactory
wrapEntryForWriting
in interface EntryFactory
ctx
- current invocation contextentry
- an internal entry to wrapcreateIfAbsent
- if true, an entry is created if it does not exist in the data container.forceLockIfAbsent
- forces a lock even if the entry is absentalreadyLocked
- if true, this hint prevents the method from acquiring any locks and the existence and ownership of the lock is presumed.forRemoval
- if true, this hint informs this method that the lock is being acquired for removal.undeleteIfNeeded
- if true, if the entry is found in the current scope (perhaps a transaction) and is deleted, it will be undeleted. If false, it will be considered deleted. * @return an MVCCEntry instance
InterruptedException
- when things go wrong, usually trying to acquire a lockpublic final boolean acquireLock(InvocationContext ctx, Object key) throws InterruptedException, TimeoutException
acquireLock
in interface EntryFactory
ctx
- contextkey
- Key to lock
InterruptedException
- if interrupted
TimeoutException
- if we are unable to acquire the lock after a specified timeout.public final void releaseLock(Object key)
releaseLock
in interface EntryFactory
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |