org.jboss.cache.interceptors
Class CreateIfNotExistsInterceptor

java.lang.Object
  extended byorg.jboss.cache.interceptors.Interceptor (src) 
      extended byorg.jboss.cache.interceptors.CreateIfNotExistsInterceptor

public class CreateIfNotExistsInterceptor
extends Interceptor (src)

Handles putXXX() methods: if the given node doesn't exist, it will be created (depending on the create_if_not_exists argument)


Constructor Summary
CreateIfNotExistsInterceptor()
           
 
Method Summary
 java.lang.Object invoke(MethodCall m)
          Synchronize between put(), remove() and evict() methods.
 void setCache(TreeCache (src)  cache)
           
 
Methods inherited from class org.jboss.cache.interceptors.Interceptor (src)
getNext, setNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateIfNotExistsInterceptor

public CreateIfNotExistsInterceptor()
Method Detail

setCache

public void setCache(TreeCache (src)  cache)
Overrides:
setCache in class Interceptor (src)

invoke

public java.lang.Object invoke(MethodCall m)
                        throws java.lang.Throwable
Synchronize between put(), remove() and evict() methods. This is coarse-grained, and should be replaced with FQN-based synchronization, e.g. put("/1/2/3" should not synchronize with remove("/a/b/c").

Overrides:
invoke in class Interceptor (src)
Parameters:
m -
Returns:
Throws:
java.lang.Throwable