Rakesh API

org.rakeshv.utils
Class DynamicCache.Cleaner

java.lang.Object
  extended by java.util.TimerTask
      extended by org.rakeshv.utils.DynamicCache.Cleaner
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
DynamicCache<K,V>

private static class DynamicCache.Cleaner
extends java.util.TimerTask

A TimerTask that is used to schedule clearing of mappings for garbage collected DynamicCache.Value objects.


Field Summary
private  java.util.ArrayList<DynamicCache> list
          A collection of instances of DynamicCache from which the garbage collected values are to be removed.
 
Constructor Summary
DynamicCache.Cleaner()
          Default constructor.
 
Method Summary
 void run()
          The action to be performed by this task when run by a Timer.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

private final java.util.ArrayList<DynamicCache> list
A collection of instances of DynamicCache from which the garbage collected values are to be removed.

Constructor Detail

DynamicCache.Cleaner

DynamicCache.Cleaner()
Default constructor. No special actions required.

Method Detail

run

public void run()
The action to be performed by this task when run by a Timer. Iterates through list and invokes DynamicCache.clean() on each instance.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask

Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan