@Override public long getTimeoutMillis() { return ehcacheNonStopConfig.getBulkOpsTimeoutMultiplyFactor() * ehcacheNonStopConfig.getTimeoutMillis(); }
/** * {@inheritDoc}. */ public void removeAll(final Collection<?> keys) { try { executeWithExecutor(new Callable<Void>() { public Void call() throws Exception { nonstopActiveDelegateHolder.getUnderlyingTerracottaStore().removeAll(keys); return null; } }, nonstopConfiguration.getTimeoutMillis() * nonstopConfiguration.getBulkOpsTimeoutMultiplyFactor()); } catch (TimeoutException e) { timeoutBehaviorResolver.resolveTimeoutBehaviorStore().removeAll(keys); } }
/** * {@inheritDoc}. */ public void putAll(final Collection<Element> elements) throws CacheException { try { executeWithExecutor(new Callable<Void>() { public Void call() throws Exception { nonstopActiveDelegateHolder.getUnderlyingTerracottaStore().putAll(elements); return null; } }, nonstopConfiguration.getTimeoutMillis() * nonstopConfiguration.getBulkOpsTimeoutMultiplyFactor()); } catch (TimeoutException e) { timeoutBehaviorResolver.resolveTimeoutBehaviorStore().putAll(elements); } }
/** * {@inheritDoc}. * The timeout used by this method is {@link NonstopConfiguration#getBulkOpsTimeoutMultiplyFactor()} times the timeout value in the * config. */ public void setNodeCoherent(final boolean coherent) throws UnsupportedOperationException { try { // always execute even when cluster offline forceExecuteWithExecutor(new Callable<Void>() { public Void call() throws Exception { nonstopActiveDelegateHolder.getUnderlyingTerracottaStore().setNodeCoherent(coherent); return null; } }, nonstopConfiguration.getTimeoutMillis() * nonstopConfiguration.getBulkOpsTimeoutMultiplyFactor()); } catch (TimeoutException e) { timeoutBehaviorResolver.resolveTimeoutBehaviorStore().setNodeCoherent(coherent); } }
/** * {@inheritDoc} */ public Map<Object, Element> getAll(final Collection<?> keys) { Map<Object, Element> rv = null; try { rv = executeWithExecutor(new Callable<Map<Object, Element>>() { public java.util.Map<Object, Element> call() throws Exception { return nonstopActiveDelegateHolder.getUnderlyingTerracottaStore().getAll(keys); }; }, nonstopConfiguration.getTimeoutMillis() * nonstopConfiguration.getBulkOpsTimeoutMultiplyFactor()); } catch (TimeoutException e) { return timeoutBehaviorResolver.resolveTimeoutBehaviorStore().getAll(keys); } return rv; }
/** * {@inheritDoc} */ public Map<Object, Element> getAllQuiet(final Collection<?> keys) { Map<Object, Element> rv = null; try { rv = executeWithExecutor(new Callable<Map<Object, Element>>() { public Map<Object, Element> call() throws Exception { return nonstopActiveDelegateHolder.getUnderlyingTerracottaStore().getAllQuiet(keys); }; }, nonstopConfiguration.getTimeoutMillis() * nonstopConfiguration.getBulkOpsTimeoutMultiplyFactor()); } catch (TimeoutException e) { return timeoutBehaviorResolver.resolveTimeoutBehaviorStore().getAllQuiet(keys); } return rv; }
/** * {@inheritDoc}. * The timeout used by this method is {@link NonstopConfiguration#getBulkOpsTimeoutMultiplyFactor()} times the timeout value in the * config. */ public void removeAll() throws CacheException { try { executeWithExecutor(new Callable<Void>() { public Void call() throws Exception { nonstopActiveDelegateHolder.getUnderlyingTerracottaStore().removeAll(); return null; } }, nonstopConfiguration.getTimeoutMillis() * nonstopConfiguration.getBulkOpsTimeoutMultiplyFactor()); } catch (TimeoutException e) { timeoutBehaviorResolver.resolveTimeoutBehaviorStore().removeAll(); } }
/** * {@inheritDoc}. * The timeout used by this method is {@link net.sf.ehcache.config.NonstopConfiguration#getBulkOpsTimeoutMultiplyFactor()} times the timeout value in the * config. */ @Override public void removeAll() throws CacheException { final Transaction tx = suspendCaller(); try { executeWithExecutor(new Callable<Void>() { public Void call() throws Exception { resumeCallee(tx); try { underlyingTerracottaStore().removeAll(); return null; } finally { suspendCallee(); } } }, nonstopConfiguration.getTimeoutMillis() * nonstopConfiguration.getBulkOpsTimeoutMultiplyFactor()); } catch (TimeoutException e) { resolveTimeoutBehaviorStore().removeAll(); } finally { resumeCaller(tx); } }
final long timeoutMillis = nsCfg.getTimeoutMillis() * nsCfg.getBulkOpsTimeoutMultiplyFactor(); try { getNonstopExecutorService().execute(new Callable<Void>() {