@Override public Status delete(String table, String recordKey) { String compositKey = createKey(table, recordKey); try { cache().remove(compositKey); return Status.OK; } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } }
@Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { LOGGER.warn("Infinispan does not support scan semantics"); return Status.NOT_IMPLEMENTED; }
@Override public boolean before(CacheRpcCommand command, Reply reply, DeliverOrder order) { log.tracef("[Discard] Checking command %s. (discard enabled=%s)", command, discard); if (discard && aClass.isAssignableFrom(command.getClass())) { log.tracef("[Discard] Discarding command %s.", command); notifier.open(); return false; } return true; }
void deleteFile(final String name) { fileOps.deleteFileName(name); readLocks.deleteOrReleaseReadLock(name); if (log.isDebugEnabled()) { log.debugf("Removed file: %s from index: %s", name, indexName); } }
@Override public void run() { log.trace("This is a runnable!"); } }
public void testSimpleEvictionMaxEntries() throws Exception { log.tracef("Max entries: ", MAX_CACHE_ELEMENTS); for (int i = 0; i < MAX_CACHE_ELEMENTS; i++) { Integer integer = Integer.valueOf(i); cache.put(integer, integer, 6, TimeUnit.HOURS); if (i % 50000 == 0) { log.tracef("Elements in cache: %s", cache.size()); } } log.debug("Finished filling in cache. Now idle while evicting thread works...."); Thread.sleep(TimeUnit.MILLISECONDS.convert(2, TimeUnit.HOURS)); }
private void insertTestData() { Cache<String, String> cache = manager(0).getCache(TEST_CACHE_NAME); for (int i = 0; i < NUM_KEYS; i++) { cache.put("key" + i, Integer.toString(i)); } log.debugf("Added %d entries to test cache", NUM_KEYS); }
/** * @see InitializingBean#afterPropertiesSet() */ @Override public void afterPropertiesSet() throws Exception { logger.info("Initializing SpringEmbeddedCacheManager instance ..."); final EmbeddedCacheManager nativeEmbeddedCacheManager = createBackingEmbeddedCacheManager(); this.cacheManager = new SpringEmbeddedCacheManager(nativeEmbeddedCacheManager); logger.info("Successfully initialized SpringEmbeddedCacheManager instance [" + this.cacheManager + "]"); }
public void stopBlocking() { if (exception != null) { throw exception; } if (!queuedTopologies.isEmpty()) { log.error("Stopped blocking topology updates, but there are " + queuedTopologies.size() + " blocked updates in the queue: " + queuedTopologies); } enabled = false; log.debugf("Stopped blocking topology updates"); }
@Override public Void call() throws Exception { waitForClusterToForm(); log.debug("3rd has join"); return null; } });
private String obtainEffectiveCacheName() { if (StringUtils.hasText(this.cacheName)) { if (this.logger.isDebugEnabled()) { this.logger.debug("Using custom cache name [" + this.cacheName + "]"); } return this.cacheName; } else { if (this.logger.isDebugEnabled()) { this.logger.debug("Using bean name [" + this.beanName + "] as cache name"); } return this.beanName; } }
public void testEventFilterPerformance() { long t1 = testEventFilterPerformance(false); long t2 = testEventFilterPerformance(true); log.infof("ClusteredListenerWithDslFilterProfilingTest.testEventFilterPerformance doRegisterListener=false took %d ms\n", t1 / 1000000); log.infof("ClusteredListenerWithDslFilterProfilingTest.testEventFilterPerformance doRegisterListener=true took %d ms\n", t2 / 1000000); }
public void testForceCommitOnOtherNode() throws Exception { String inDoubt = showInDoubtTransactions(0); assertInDoubtTxCount(inDoubt, 1); assertInDoubtTxCount(showInDoubtTransactions(1), 1); List<Long> ids = getInternalIds(inDoubt); assertEquals(1, ids.size()); assertEquals(0, cache(0, "test").keySet().size()); assertEquals(0, cache(1, "test").keySet().size()); if (log.isTraceEnabled()) log.trace("Before forcing commit!"); String result = invokeForceWithId("forceCommit", 0, ids.get(0)); checkResponse(result, 1); }
@Override public void stop() { log.tracef("Stopping global component registry"); managerStopBlocked.complete(null); managerStopResumed.join(); super.stop(); } }, true);
void deleteFile(final String name) { fileOps.deleteFileName(name); readLocks.deleteOrReleaseReadLock(name); if (log.isDebugEnabled()) { log.debugf("Removed file: %s from index: %s from %s", name, indexName, getAddress(chunksCache)); } }
@Override public void removeRecoveryInformation(Collection<Address> where, Xid xid, boolean sync, GlobalTransaction gtx, boolean fromCluster) { if (swallowRemoveRecoveryInfoCalls){ log.trace("PostCommitRecoveryStateTest$RecoveryManagerDelegate.removeRecoveryInformation"); } else { this.rm.removeRecoveryInformation(where, xid, sync, null, false); } }