org.jboss.cache.interceptors
Class CreateIfNotExistsInterceptor

java.lang.Object
  extended byorg.jboss.cache.interceptors.Interceptor
      extended byorg.jboss.cache.interceptors.CreateIfNotExistsInterceptor

public class CreateIfNotExistsInterceptor
extends Interceptor

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

Version:
$Id: CreateIfNotExistsInterceptor.java,v 1.2.2.2 2005/04/06 21:06:41 starksm Exp $
Author:
Bela Ban

Constructor Summary
CreateIfNotExistsInterceptor()
           
 
Method Summary
 Object invoke(org.jgroups.blocks.MethodCall m)
          Synchronize between put(), remove() and evict() methods.
 void setCache(TreeCache cache)
           
 
Methods inherited from class org.jboss.cache.interceptors.Interceptor
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 cache)
Overrides:
setCache in class Interceptor

invoke

public Object invoke(org.jgroups.blocks.MethodCall m)
              throws 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
Parameters:
m -
Returns:
Throws:
Throwable


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.