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.behavior;
 
 import java.util.List;
 
 
 public class ExecutorBehavior implements NonStopCacheBehavior {
 
     private final NonStopCacheBehavior executeBehavior;
     private final NonStopCacheConfig nonStopCacheConfig;

    
Constructor accepting the direct delegate behavior, net.sf.ehcache.constructs.nonstop.NonStopCacheConfig, net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService and NonStopCacheBehaviorResolver

Parameters:
executeBehavior
nonStopCacheConfig
executorService
timeoutBehaviorResolver
 
     public ExecutorBehavior(final NonStopCacheBehavior executeBehaviorfinal NonStopCacheConfig nonStopCacheConfig,
             final NonStopCacheExecutorService executorServicefinal NonStopCacheBehaviorResolver timeoutBehaviorResolver) {
         this. = executeBehavior;
         this. = nonStopCacheConfig;
         this. = executorService;
         this. = timeoutBehaviorResolver;
     }
 
     private <V> V executeWithExecutor(final Callable<V> callablethrows CacheExceptionTimeoutException {
         try {
             return .execute(callable.getTimeoutMillis());
         } catch (InterruptedException e) {
             // rethrow as CacheException
             throw new CacheException(e);
         }
     }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

 
     public Element get(final Object keythrows IllegalStateExceptionCacheException {
         Element element = null;
         try {
             element = executeWithExecutor(new Callable<Element>() {
                 public Element call() throws Exception {
                     return .get(key);
                 }
             });
         } catch (TimeoutException e) {
             return .resolveBehavior().get(key);
         }
         return element;
     }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

 
     public Element get(final Serializable keythrows IllegalStateExceptionCacheException {
        return get((Objectkey);
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public Element getQuiet(final Object keythrows IllegalStateExceptionCacheException {
        Element element = null;
        try {
            element = executeWithExecutor(new Callable<Element>() {
                public Element call() throws Exception {
                    return .getQuiet(key);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().getQuiet(key);
        }
        return element;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public Element getQuiet(final Serializable keythrows IllegalStateExceptionCacheException {
        return getQuiet((Objectkey);
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public List getKeys() throws IllegalStateExceptionCacheException {
        List keys = null;
        try {
            keys = executeWithExecutor(new Callable<List>() {
                public List call() throws Exception {
                    return .getKeys();
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().getKeys();
        }
        return keys;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

        List keys = null;
        try {
            keys = executeWithExecutor(new Callable<List>() {
                public List call() throws Exception {
                    return .getKeysNoDuplicateCheck();
                }
            });
        } catch (TimeoutException e) {
        }
        return keys;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

        List keys = null;
        try {
            keys = executeWithExecutor(new Callable<List>() {
                public List call() throws Exception {
                    return .getKeysWithExpiryCheck();
                }
            });
        } catch (TimeoutException e) {
        }
        return keys;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public void put(final Element elementfinal boolean doNotNotifyCacheReplicatorsthrows IllegalArgumentException,
            IllegalStateExceptionCacheException {
        try {
            executeWithExecutor(new Callable<Void>() {
                public Void call() throws Exception {
                    .put(elementdoNotNotifyCacheReplicators);
                    return null;
                }
            });
        } catch (TimeoutException e) {
            .resolveBehavior().put(elementdoNotNotifyCacheReplicators);
        }
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public void put(final Element elementthrows IllegalArgumentExceptionIllegalStateExceptionCacheException {
        try {
            executeWithExecutor(new Callable<Void>() {
                public Void call() throws Exception {
                    .put(element);
                    return null;
                }
            });
        } catch (TimeoutException e) {
            .resolveBehavior().put(element);
        }
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public void putQuiet(final Element elementthrows IllegalArgumentExceptionIllegalStateExceptionCacheException {
        try {
            executeWithExecutor(new Callable<Void>() {
                public Void call() throws Exception {
                    .putQuiet(element);
                    return null;
                }
            });
        } catch (TimeoutException e) {
            .resolveBehavior().putQuiet(element);
        }
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public void putWithWriter(final Element elementthrows IllegalArgumentExceptionIllegalStateExceptionCacheException {
        try {
            executeWithExecutor(new Callable<Void>() {
                public Void call() throws Exception {
                    .putWithWriter(element);
                    return null;
                }
            });
        } catch (TimeoutException e) {
            .resolveBehavior().putWithWriter(element);
        }
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean remove(final Object keyfinal boolean doNotNotifyCacheReplicatorsthrows IllegalStateException {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return Boolean.valueOf(.remove(keydoNotNotifyCacheReplicators));
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().remove(keydoNotNotifyCacheReplicators);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean remove(final Object keythrows IllegalStateException {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return Boolean.valueOf(.remove(key));
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().remove(key);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean remove(final Serializable keyfinal boolean doNotNotifyCacheReplicatorsthrows IllegalStateException {
        return this.remove((ObjectkeydoNotNotifyCacheReplicators);
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean remove(final Serializable keythrows IllegalStateException {
        return this.remove((Objectkey);
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public void removeAll() throws IllegalStateExceptionCacheException {
        try {
            executeWithExecutor(new Callable<Void>() {
                public Void call() throws Exception {
                    .removeAll();
                    return null;
                }
            });
        } catch (TimeoutException e) {
        }
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public void removeAll(final boolean doNotNotifyCacheReplicatorsthrows IllegalStateExceptionCacheException {
        try {
            executeWithExecutor(new Callable<Void>() {
                public Void call() throws Exception {
                    .removeAll(doNotNotifyCacheReplicators);
                    return null;
                }
            });
        } catch (TimeoutException e) {
            .resolveBehavior().removeAll(doNotNotifyCacheReplicators);
        }
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean isKeyInCache(final Object key) {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return Boolean.valueOf(.isKeyInCache(key));
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().isKeyInCache(key);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean isValueInCache(final Object value) {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return Boolean.valueOf(.isValueInCache(value));
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().isValueInCache(value);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public long calculateInMemorySize() throws IllegalStateExceptionCacheException {
        long result = 0;
        try {
            result = executeWithExecutor(new Callable<Long>() {
                public Long call() throws Exception {
                    return Long.valueOf(.calculateInMemorySize());
                }
            });
        } catch (TimeoutException e) {
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public void evictExpiredElements() {
        try {
            executeWithExecutor(new Callable<Void>() {
                public Void call() throws Exception {
                    .evictExpiredElements();
                    return null;
                }
            });
        } catch (TimeoutException e) {
        }
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public void flush() throws IllegalStateExceptionCacheException {
        try {
            executeWithExecutor(new Callable<Void>() {
                public Void call() throws Exception {
                    .flush();
                    return null;
                }
            });
        } catch (TimeoutException e) {
            .resolveBehavior().flush();
        }
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public int getDiskStoreSize() throws IllegalStateException {
        int result = 0;
        try {
            result = executeWithExecutor(new Callable<Integer>() {
                public Integer call() throws Exception {
                    return Integer.valueOf(.getDiskStoreSize());
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().getDiskStoreSize();
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public Object getInternalContext() {
        Object result = 0;
        try {
            result = executeWithExecutor(new Callable<Object>() {
                public Object call() throws Exception {
                    return .getInternalContext();
                }
            });
        } catch (TimeoutException e) {
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public long getMemoryStoreSize() throws IllegalStateException {
        long result = 0;
        try {
            result = executeWithExecutor(new Callable<Long>() {
                public Long call() throws Exception {
                    return Long.valueOf(.getMemoryStoreSize());
                }
            });
        } catch (TimeoutException e) {
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public int getSize() throws IllegalStateExceptionCacheException {
        int result = 0;
        try {
            result = executeWithExecutor(new Callable<Integer>() {
                public Integer call() throws Exception {
                    return Integer.valueOf(.getSize());
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().getSize();
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public int getSizeBasedOnAccuracy(final int statisticsAccuracythrows IllegalArgumentExceptionIllegalStateExceptionCacheException {
        int result = 0;
        try {
            result = executeWithExecutor(new Callable<Integer>() {
                public Integer call() throws Exception {
                    return .getSizeBasedOnAccuracy(statisticsAccuracy);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().getSizeBasedOnAccuracy(statisticsAccuracy);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public Statistics getStatistics() throws IllegalStateException {
        Statistics result = null;
        try {
            result = executeWithExecutor(new Callable<Statistics>() {
                public Statistics call() throws Exception {
                    return .getStatistics();
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().getStatistics();
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean isElementInMemory(final Object key) {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return .isElementInMemory(key);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().isElementInMemory(key);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean isElementInMemory(Serializable key) {
        return isElementInMemory((Objectkey);
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean isElementOnDisk(final Object key) {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return .isElementOnDisk(key);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().isElementOnDisk(key);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean isElementOnDisk(Serializable key) {
        return isElementOnDisk((Objectkey);
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public Element putIfAbsent(final Element elementthrows NullPointerException {
        Element result = null;
        try {
            result = executeWithExecutor(new Callable<Element>() {
                public Element call() throws Exception {
                    return .putIfAbsent(element);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().putIfAbsent(element);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean removeElement(final Element elementthrows NullPointerException {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return .removeElement(element);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().removeElement(element);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean removeQuiet(final Object keythrows IllegalStateException {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return .removeQuiet(key);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().removeQuiet(key);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean removeQuiet(Serializable keythrows IllegalStateException {
        return removeQuiet((Objectkey);
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean removeWithWriter(final Object keythrows IllegalStateExceptionCacheException {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return .removeWithWriter(key);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().removeWithWriter(key);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public boolean replace(final Element oldfinal Element elementthrows NullPointerExceptionIllegalArgumentException {
        boolean result = false;
        try {
            result = executeWithExecutor(new Callable<Boolean>() {
                public Boolean call() throws Exception {
                    return .replace(oldelement);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().replace(oldelement);
        }
        return result;
    }

    
.

Executes the direct delegate behavior with the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService using the timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheConfig. On timeout from the net.sf.ehcache.constructs.nonstop.NonStopCacheExecutorService, uses the behavior resolved from the NonStopCacheBehaviorResolver to execute the behavior

    public Element replace(final Element elementthrows NullPointerException {
        Element result = null;
        try {
            result = executeWithExecutor(new Callable<Element>() {
                public Element call() throws Exception {
                    return .replace(element);
                }
            });
        } catch (TimeoutException e) {
            return .resolveBehavior().replace(element);
        }
        return result;
    }
New to GrepCode? Check out our FAQ X