/** * Kill the processor thread and indicate that the queue is destroyed and no longer alive, but it * can still be working. */ protected void stopProcessing() { setAlive(false); processorThread = null; }
/** * Test setup. Create the static queue to be used by all tests */ @Override public void setUp() { listen = new CacheListenerImpl<String, String>(); queue = new CacheEventQueue<String, String>( listen, 1L, "testCache1", maxFailure, waitBeforeRetry ); queue.setWaitToDieMillis( idleTime ); }
@Override public void runTest() throws Exception { this.runPutTest( 5200, 6600 ); } } );
/** * @param cacheName * @param key * @return null */ @Override public ICacheElement<K, V> get( String cacheName, K key ) { return get( cacheName, key, 0 ); }
@Override public void runTest() throws Exception { this.runStopProcessingTest(); } } );
/** * Add remove events to the event queue. * @throws Exception */ public void runStopProcessingTest() throws Exception { queue.stopProcessing(); }
@Override public void runTest() throws Exception { this.runPutDelayTest( 100, 6700 ); } } );
@Override public void runTest() throws Exception { this.runRemoveTest( 2200 ); } } );
@Override public void runTest() throws Exception { this.runPutTest( 200, 200 ); } } );
@Override public void runTest() throws Exception { this.runRemoveTest( 5200 ); } } );
/** * @param cacheName * @param keys * @return empty map */ @Override public Map<K, ICacheElement<K, V>> getMultiple( String cacheName, Set<K> keys ) { return getMultiple( cacheName, keys, 0 ); }
@Override public void runTest() throws Exception { this.runStopProcessingTest(); } } );
@Override public void runTest() throws Exception { this.runPutTest( 1200, 1400 ); } } );
/** * Test setup. Create the static queue to be used by all tests */ @Override public void setUp() { listen = new CacheListenerImpl<String, String>(); queue = new CacheEventQueue<String, String>( listen, 1L, "testCache1", maxFailure, waitBeforeRetry ); queue.setWaitToDieMillis( idleTime ); }
@Override public void runTest() throws Exception { this.runPutTest( 5200, 6600 ); } } );
/** * @param cacheName * @param key * @return null */ @Override public ICacheElement<K, V> get( String cacheName, K key ) { return get( cacheName, key, 0 ); }
@Override public void runTest() throws Exception { this.runStopProcessingTest(); } } );
/** * Add remove events to the event queue. * @throws Exception */ public void runStopProcessingTest() throws Exception { queue.stopProcessing(); }
@Override public void runTest() throws Exception { this.runPutDelayTest( 100, 6700 ); } } );
@Override public void runTest() throws Exception { this.runRemoveTest( 2200 ); } } );