org.jboss.cache.interceptors
Class CreateIfNotExistsInterceptor

java.lang.Object
  |
  +--org.jboss.cache.interceptors.Interceptor
        |
        +--org.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.4.12.1 2006/02/07 18:17:57 bstansberry Exp $
Author:
Bela Ban

Constructor Summary
CreateIfNotExistsInterceptor()
           
 
Method Summary
 java.lang.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 java.lang.Object invoke(org.jgroups.blocks.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
Parameters:
m -
Returns:
Throws:
java.lang.Throwable


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.