|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@ThreadSafe public interface CacheSPI<K,V>
A more detailed interface to Cache
, which is used when writing plugins for or extending JBoss Cache. A reference
to this interface should only be obtained when it is passed in to your code, for example when you write an
Interceptor
or CacheLoader
.
Cache
instance to this interface. In future, the implementation may not allow it.
This interface contains overridden method signatures of some methods from Cache
, overridden to ensure return
types of Node
are replaced with NodeSPI
.
NodeSPI
,
Cache
,
CacheLoader
,
Interceptor
Method Summary | |
---|---|
void |
addInterceptor(Interceptor i,
int position)
Adds a custom interceptor to the interceptor chain, at specified position, where the first interceptor in the chain is at position 0 and the last one at getInterceptorChain().size() - 1. |
BuddyManager |
getBuddyManager()
|
CacheLoaderManager |
getCacheLoaderManager()
|
java.lang.String |
getClusterName()
|
GlobalTransaction |
getCurrentTransaction(javax.transaction.Transaction tx,
boolean createIfNotExists)
Returns the global transaction for this local transaction. |
java.util.List<Interceptor> |
getInterceptorChain()
|
java.util.Map<java.lang.Thread,java.util.List<NodeLock>> |
getLockTable()
Retrieves the current table of locks. |
Marshaller |
getMarshaller()
Retrieves an instance of a Marshaller , which is capable of
converting Java objects to bytestreams and back in an efficient manner, which is
also interoperable with bytestreams produced/consumed by other versions of JBoss
Cache. |
Notifier |
getNotifier()
|
int |
getNumberOfAttributes()
|
int |
getNumberOfNodes()
|
RegionManager |
getRegionManager()
|
NodeSPI<K,V> |
getRoot()
Overrides Cache.getRoot() to return a NodeSPI instead of a Node . |
RPCManager |
getRPCManager()
Gets a handle of the RPC manager. |
StateTransferManager |
getStateTransferManager()
|
javax.transaction.TransactionManager |
getTransactionManager()
Retrieves a reference to a running TransactionManager , if one is configured. |
TransactionTable |
getTransactionTable()
|
GravitateResult |
gravitateData(Fqn<?> fqn,
boolean searchBuddyBackupSubtrees)
Used with buddy replication's data gravitation interceptor. |
NodeSPI<K,V> |
peek(Fqn<?> fqn,
boolean includeDeletedNodes)
Returns a node without accessing the interceptor chain. |
void |
removeInterceptor(int position)
Removes the interceptor at a specified position, where the first interceptor in the chain is at position 0 and the last one at getInterceptorChain().size() - 1. |
Methods inherited from interface org.jboss.cache.Cache |
---|
addCacheListener, addCacheListener, create, destroy, evict, get, getCacheListeners, getCacheListeners, getCacheStatus, getConfiguration, getInvocationContext, getLocalAddress, getMembers, getRegion, getVersion, move, put, put, putForExternalRead, remove, removeCacheListener, removeCacheListener, removeNode, removeRegion, setInvocationContext, start, stop |
Method Detail |
---|
NodeSPI<K,V> getRoot()
Cache.getRoot()
to return a NodeSPI
instead of a Node
.
getRoot
in interface Cache<K,V>
javax.transaction.TransactionManager getTransactionManager()
TransactionManager
, if one is configured.
java.util.List<Interceptor> getInterceptorChain()
List
of Interceptor
s configured for this cache, or
null
if create()
has not been invoked
and the interceptors thus do not exist.void addInterceptor(Interceptor i, int position)
i
- the interceptor to addposition
- the position to add the interceptorvoid removeInterceptor(int position)
position
- the position at which to remove an interceptorCacheLoaderManager getCacheLoaderManager()
CacheLoaderManager
if one or more cache loaders are configured, null otherwise.BuddyManager getBuddyManager()
BuddyManager
if buddy replication is enabled, null otherwise.TransactionTable getTransactionTable()
TransactionTable
RPCManager getRPCManager()
RPCManager
configured.StateTransferManager getStateTransferManager()
StateTransferManager
java.lang.String getClusterName()
int getNumberOfAttributes()
int getNumberOfNodes()
java.util.Map<java.lang.Thread,java.util.List<NodeLock>> getLockTable()
RegionManager getRegionManager()
RegionManager
GlobalTransaction getCurrentTransaction(javax.transaction.Transaction tx, boolean createIfNotExists)
tx
- the current transactioncreateIfNotExists
- if true creates a new transaction if none exists
Notifier getNotifier()
Notifier
, a class
that is responsible for emitting notifications to registered CacheListeners.NodeSPI<K,V> peek(Fqn<?> fqn, boolean includeDeletedNodes)
fqn
- the Fqn to look up.includeDeletedNodes
- if you intend to see nodes marked as deleted within the current tx, set this to true
GravitateResult gravitateData(Fqn<?> fqn, boolean searchBuddyBackupSubtrees)
Configuration.useRegionBasedMarshalling
and the Region
pertaining to the Fqn passed in is activated, and has an appropriate ClassLoader.
fqn
- the fqn to gravitatesearchBuddyBackupSubtrees
- if true, buddy backup subtrees are searched and if false, they are not.
Marshaller getMarshaller()
Marshaller
, which is capable of
converting Java objects to bytestreams and back in an efficient manner, which is
also interoperable with bytestreams produced/consumed by other versions of JBoss
Cache.
The use of this marshaller is the recommended way of creating efficient,
compatible, byte streams from objects.
Marshaller
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |