Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2003-2010 Terracotta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 
 package net.sf.ehcache.constructs.nonstop;
 
 import java.util.List;
 
Interface that defines behaviors for different get/put/remove operations on a cache. Different implementations can have different behaviors for each operation

Author(s):
Abhishek Sanoujam
 
 public interface NonStopCacheBehavior {

    
This method is called when the same operation times out in the TimeoutCache

Parameters:
key
Returns:
depends on the type extending this class
Throws:
java.lang.IllegalStateException
net.sf.ehcache.CacheException
 
     public Element get(Object keythrows IllegalStateExceptionCacheException;
 
     public Element get(final Serializable keythrows IllegalStateExceptionCacheException;

    
This method is called when the same operation times out in the TimeoutCache

 
     public Element getQuiet(Object keythrows IllegalStateExceptionCacheException;
 
     public Element getQuiet(final Serializable keythrows IllegalStateExceptionCacheException;

    
This method is called when the same operation times out in the TimeoutCache

 
     public List getKeys() throws IllegalStateExceptionCacheException;

    
This method is called when the same operation times out in the TimeoutCache

Returns:
list of keys
Throws:
java.lang.IllegalStateException
 
     public List getKeysNoDuplicateCheck() throws IllegalStateException;

    
This method is called when the same operation times out in the TimeoutCache

 
 
     int getSizeBasedOnAccuracy(int statisticsAccuracythrows IllegalArgumentExceptionIllegalStateExceptionCacheException;

    
This method is called when the same operation times out in the TimeoutCache

Parameters:
key
Returns:
true if the key is in the cache otherwise false
 
     public boolean isKeyInCache(Object key);

    
This method is called when the same operation times out in the TimeoutCache

Parameters:
value
Returns:
true if the value is in the cache otherwise false
    public boolean isValueInCache(Object value);

    
This method is called when the same operation times out in the TimeoutCache

    public void put(Element elementboolean doNotNotifyCacheReplicatorsthrows IllegalArgumentExceptionIllegalStateException,
            CacheException;

    
This method is called when the same operation times out in the TimeoutCache

    public void put(Element elementthrows IllegalArgumentExceptionIllegalStateExceptionCacheException;

    
This method is called when the same operation times out in the TimeoutCache

    public void putQuiet(Element elementthrows IllegalArgumentExceptionIllegalStateExceptionCacheException;

    
This method is called when the same operation times out in the TimeoutCache

    public void putWithWriter(Element elementthrows IllegalArgumentExceptionIllegalStateExceptionCacheException;

    
This method is called when the same operation times out in the TimeoutCache

Parameters:
key
doNotNotifyCacheReplicators
Returns:
Throws:
java.lang.IllegalStateException
    public boolean remove(Object keyboolean doNotNotifyCacheReplicatorsthrows IllegalStateException;

    
This method is called when the same operation times out in the TimeoutCache

Parameters:
key
Returns:
Throws:
java.lang.IllegalStateException
    public boolean remove(Object keythrows IllegalStateException;
    public boolean remove(final Serializable keyfinal boolean doNotNotifyCacheReplicatorsthrows IllegalStateException;
    public boolean remove(final Serializable keythrows IllegalStateException;
    boolean removeQuiet(Object keythrows IllegalStateException;
    boolean removeQuiet(Serializable keythrows IllegalStateException;

    
This method is called when the same operation times out in the TimeoutCache

    public void removeAll() throws IllegalStateExceptionCacheException;

    
This method is called when the same operation times out in the TimeoutCache

Parameters:
doNotNotifyCacheReplicators
Throws:
java.lang.IllegalStateException
net.sf.ehcache.CacheException
    public void removeAll(boolean doNotNotifyCacheReplicatorsthrows IllegalStateExceptionCacheException;
    boolean isElementInMemory(Serializable key);
    boolean isElementInMemory(Object key);
    boolean isElementOnDisk(Serializable key);
    boolean isElementOnDisk(Object key);
    void evictExpiredElements();
    boolean replace(Element oldElement elementthrows NullPointerExceptionIllegalArgumentException;
    Element replace(Element elementthrows NullPointerException;
    void flush() throws IllegalStateExceptionCacheException;
    boolean removeElement(Element elementthrows NullPointerException;
    Element putIfAbsent(Element elementthrows NullPointerException;
New to GrepCode? Check out our FAQ X