|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.MethodDispacherInterceptor
public abstract class MethodDispacherInterceptor
The purpose of this interceptor is to supply a nicer way of handling the interception of desired methods:
- one can regiter to be notified on an particular method call by extending handleCalledMethod method.
This would result in removal of switch statemenets in invoke
- the parameters of the hendler methods are passes in strongly typed, rather than as an array of Objects
This interceptor acts as a switch that delegates method calls to handlers/methods.
Implementation notes:
Current implementation checks to see the methods that are overwritten and does only perform calls to those methods.
This is for avoiding the casts needed to build parameter list. If a non-overridden method is invoked,
then next interceptor will be called.
| Field Summary |
|---|
| Fields inherited from class org.jboss.cache.interceptors.Interceptor |
|---|
cache, configuration, last, log, next, trace |
| Constructor Summary | |
|---|---|
protected |
MethodDispacherInterceptor()
|
| Methods inherited from class org.jboss.cache.interceptors.Interceptor |
|---|
assertTransactionValid, dumpStatistics, getLast, getNext, getStatisticsEnabled, initLogger, isActive, isPreparing, isValid, nextInterceptor, peekNode, resetStatistics, setCache, setLast, setNext, setStatisticsEnabled, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected MethodDispacherInterceptor()
| Method Detail |
|---|
public Object invoke(InvocationContext ctx)
throws Throwable
invoke in class InterceptorThrowable
protected Object handleLockMethod(InvocationContext ctx,
Fqn fqn,
NodeLock.LockType lockType,
boolean recursive)
throws Throwable
CacheImpl._lock(org.jboss.cache.Fqn, org.jboss.cache.lock.NodeLock.LockType, boolean)
Throwable
protected Object handleUnblockChannelMethod(InvocationContext ctx)
throws Throwable
CacheImpl._unblock()
Throwable
protected Object handleBlockChannelMethod(InvocationContext ctx)
throws Throwable
CacheImpl._block()
Throwable
protected Object handleRemoveDataVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
boolean createUndoOps,
DataVersion dv)
throws Throwable
CacheImpl._removeData(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, boolean, org.jboss.cache.optimistic.DataVersion)
Throwable
protected Object handleRemoveKeyVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Object key,
boolean createUndoOps,
DataVersion dv)
throws Throwable
CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, boolean, org.jboss.cache.optimistic.DataVersion)
Throwable
protected Object handleRemoveNodeVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
boolean createUndoOps,
DataVersion dv)
throws Throwable
CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, boolean, org.jboss.cache.optimistic.DataVersion)
Throwable
protected Object handleDataGravitationCleanupMethod(InvocationContext ctx,
Fqn primary,
Fqn backup)
throws Throwable
RemoteCacheInvocationDelegate.dataGravitationCleanup(org.jboss.cache.Fqn, org.jboss.cache.Fqn)
Throwable
protected Object handlePutForExternalReadVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Object key,
Object value,
DataVersion dv)
throws Throwable
CacheImpl._putForExternalRead(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object, org.jboss.cache.optimistic.DataVersion)
Throwable
protected Object handlePutKeyValueVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Object key,
Object value,
boolean createUndoOps,
DataVersion dv)
throws Throwable
CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object, boolean, org.jboss.cache.optimistic.DataVersion)
Throwable
protected Object handlePutDataVersionedMethod(InvocationContext ctx,
GlobalTransaction globalTransaction,
Fqn fqn,
Map map,
Boolean createUndoOps,
DataVersion dataVersion)
throws Throwable
CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, org.jboss.cache.optimistic.DataVersion)
Throwable
protected Object handlePutDataEraseVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Map data,
boolean createUndoOps,
boolean eraseContent,
DataVersion dv)
throws Throwable
CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean, org.jboss.cache.optimistic.DataVersion)
Throwable
protected Object handleExistsMethod(InvocationContext ctx,
Fqn fqn)
throws Throwable
CacheImpl.exists(String)
Throwableprotected boolean skipMethodCall(InvocationContext ctx)
protected Object handleEvictVersionedNodeMethod(InvocationContext ctx,
Fqn fqn,
DataVersion dataVersion)
throws Throwable
CacheImpl._evict(org.jboss.cache.Fqn, org.jboss.cache.optimistic.DataVersion)
Throwable
protected Object handleEvictMethod(InvocationContext ctx,
Fqn fqn)
throws Throwable
Throwable
protected Object handlePrepareMethod(InvocationContext ctx,
GlobalTransaction gtx,
List modification,
org.jgroups.Address coordinator,
boolean onePhaseCommit)
throws Throwable
CacheImpl.prepare(org.jboss.cache.transaction.GlobalTransaction, java.util.List, org.jgroups.Address, boolean)
Throwable
protected Object handleOptimisticPrepareMethod(InvocationContext ctx,
GlobalTransaction gtx,
List modifications,
Map data,
org.jgroups.Address address,
boolean onePhaseCommit)
throws Throwable
CacheImpl.optimisticPrepare(org.jboss.cache.transaction.GlobalTransaction, java.util.List, java.util.Map, org.jgroups.Address, boolean)
Throwable
protected Object handleCommitMethod(InvocationContext ctx,
GlobalTransaction globalTransaction)
throws Throwable
CacheImpl.commit(org.jboss.cache.transaction.GlobalTransaction)
Throwable
protected Object handleRemoveDataMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
boolean createUndoOps)
throws Throwable
CacheImpl._removeData(org.jboss.cache.transaction.GlobalTransaction, Fqn, boolean)
Throwable
protected Object handleRemoveKeyMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
Object key,
boolean createUndoOps)
throws Throwable
CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, String, Object, boolean)
Throwable
protected Object handleRemoveNodeMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
boolean createUndoOps)
throws Throwable
CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, String, boolean)
Throwable
protected Object handleRollbackMethod(InvocationContext ctx,
GlobalTransaction globalTransaction)
throws Throwable
CacheImpl.rollback(org.jboss.cache.transaction.GlobalTransaction)
Throwable
protected Object handleGetDataMapMethod(InvocationContext ctx,
Fqn fqn)
throws Throwable
CacheImpl._getData(org.jboss.cache.Fqn)
Throwable
protected Object handleGetKeysMethod(InvocationContext ctx,
Fqn fqn)
throws Throwable
Cache.getKeys(Fqn)
Throwable
protected Object handlePrintMethod(InvocationContext ctx,
Fqn fqn)
throws Throwable
CacheImpl._print(org.jboss.cache.Fqn)
Throwable
protected Object handleReleaseAllLocksMethod(InvocationContext ctx,
Fqn fqn)
throws Throwable
CacheImpl._releaseAllLocks(org.jboss.cache.Fqn)
Throwable
protected Object handleGetChildrenNamesMethod(InvocationContext ctx,
Fqn fqn)
throws Throwable
CacheImpl._getChildrenNames(org.jboss.cache.Fqn)
Throwable
protected Object handleGetNodeMethod(InvocationContext ctx,
Fqn fqn)
throws Throwable
CacheImpl._get(org.jboss.cache.Fqn)
Throwable
protected Object handleGetKeyValueMethod(InvocationContext ctx,
Fqn fqn,
Object key,
boolean sendNodeEvent)
throws Throwable
CacheImpl._get(org.jboss.cache.Fqn, Object, boolean)
Throwable
protected Object handleAddChildMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn parentFqn,
Object childName,
Node cn,
boolean createUndoOps)
throws Throwable
CacheImpl._addChild(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, org.jboss.cache.Node, boolean)
Throwable
protected Object handleMoveMethod(InvocationContext ctx,
Fqn from,
Fqn to)
throws Throwable
CacheImpl._move(org.jboss.cache.Fqn, org.jboss.cache.Fqn)
Throwable
protected Object handlePutKeyValueMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Object key,
Object value,
boolean createUndoOps)
throws Throwable
CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, Object, Object, boolean)
Throwable
protected Object handlePutForExternalReadMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
Object key,
Object value)
throws Throwable
CacheImpl._putForExternalRead(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object)
Throwable
protected Object handlePutDataMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
Map data,
boolean createUndoOps)
throws Throwable
CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, java.util.Map, boolean)
Throwable
protected Object handlePutDataEraseMethod(InvocationContext ctx,
GlobalTransaction gt,
Fqn fqn,
Map newData,
boolean createUndoOps,
boolean eraseContents)
throws Throwable
CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean)
Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||