test_class.declarator: cacheTask
test_class.modifier: @Mock
test_class.original_string: @Mock
    CacheTask<Object, Object> cacheTask;
test_class.type: CacheTask<Object, Object>
test_class.var_name: cacheTask
test_class.declarator: cacheTasks
test_class.modifier: @Mock
test_class.original_string: @Mock
    BlockingQueue<CacheTask<Object, Object>> cacheTasks;
test_class.type: BlockingQueue<CacheTask<Object, Object>>
test_class.var_name: cacheTasks
test_class.declarator: asyncEvictionListener
test_class.original_string: ScheduledEvictionListener<Object, Object> asyncEvictionListener;
test_class.type: ScheduledEvictionListener<Object, Object>
test_class.var_name: asyncEvictionListener
test_class.file: imcache-core/src/test/java/com/cetsoft/imcache/cache/async/ScheduledEvictionListenerTest.java
test_class.identifier: ScheduledEvictionListenerTest
test_case.body: @Test
    public void init() throws InterruptedException {
      long period = 1;
      doNothing().when(asyncEvictionListener).drainQueue();
      asyncEvictionListener.init(period, 3);
      Thread.sleep(period * 50);
      verify(asyncEvictionListener, atLeast(1)).drainQueue();
    }
test_case.class_method_signature: ScheduledEvictionListenerTest.init()
test_case.full_signature: @Test public void init()
test_case.identifier: init
test_case.invocations: drainQueue when doNothing init sleep drainQueue verify atLeast
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void init()
focal_class.declarator: DEFAULT_PERIOD = 3000
focal_class.modifier: public static final
focal_class.original_string: public static final long DEFAULT_PERIOD = 3000;
focal_class.type: long
focal_class.var_name: DEFAULT_PERIOD
focal_class.declarator: NO_OF_EVICTION_DRAINERS = new AtomicInteger()
focal_class.modifier: private static final
focal_class.original_string: private static final AtomicInteger NO_OF_EVICTION_DRAINERS = new AtomicInteger();
focal_class.type: AtomicInteger
focal_class.var_name: NO_OF_EVICTION_DRAINERS
focal_class.file: imcache-core/src/main/java/com/cetsoft/imcache/cache/async/ScheduledEvictionListener.java
focal_class.identifier: ScheduledEvictionListener
focal_class.class_method_signature: ScheduledEvictionListener.ScheduledEvictionListener()
focal_class.full_signature: public  ScheduledEvictionListener()
focal_class.identifier: ScheduledEvictionListener
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ScheduledEvictionListener()
focal_class.class_method_signature: ScheduledEvictionListener.ScheduledEvictionListener(final int batchSize, final long period, final int queueSize)
focal_class.full_signature: public  ScheduledEvictionListener(final int batchSize, final long period, final int queueSize)
focal_class.identifier: ScheduledEvictionListener
focal_class.modifiers: public
focal_class.parameters: (final int batchSize, final long period, final int queueSize)
focal_class.signature:  ScheduledEvictionListener(final int batchSize, final long period, final int queueSize)
focal_class.class_method_signature: ScheduledEvictionListener.init(final long period, final int queueSize)
focal_class.full_signature: protected void init(final long period, final int queueSize)
focal_class.identifier: init
focal_class.modifiers: protected
focal_class.parameters: (final long period, final int queueSize)
focal_class.return: void
focal_class.signature: void init(final long period, final int queueSize)
focal_class.class_method_signature: ScheduledEvictionListener.drainQueue()
focal_class.full_signature: @Override protected void drainQueue()
focal_class.identifier: drainQueue
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void drainQueue()
focal_class.superclass: extends QueuingEvictionListener<K, V>
focal_method.body: protected void init(final long period, final int queueSize) {
      cacheTasks = new ArrayBlockingQueue<>(queueSize);
      final ScheduledExecutorService drainerService = Executors.newSingleThreadScheduledExecutor(
          runnable -> ThreadUtils
              .createDaemonThread(runnable, "imcache:batchAsyncEvictionDrainer(thread="
                  + NO_OF_EVICTION_DRAINERS.incrementAndGet() + ")"));
      drainerService.scheduleAtFixedRate(new Runnable() {
        public void run() {
          drainQueue();
        }
      }, period, period, TimeUnit.MILLISECONDS);
    }
focal_method.class_method_signature: ScheduledEvictionListener.init(final long period, final int queueSize)
focal_method.full_signature: protected void init(final long period, final int queueSize)
focal_method.identifier: init
focal_method.invocations: newSingleThreadScheduledExecutor createDaemonThread incrementAndGet scheduleAtFixedRate drainQueue
focal_method.modifiers: protected
focal_method.parameters: (final long period, final int queueSize)
focal_method.return: void
focal_method.signature: void init(final long period, final int queueSize)