ehcache

net.sf.ehcache.util
Class WeakIdentityConcurrentMap<K,V>

java.lang.Object
  extended by net.sf.ehcache.util.WeakIdentityConcurrentMap<K,V>
Type Parameters:
K - The key type
V - The value type

public final class WeakIdentityConcurrentMap<K,V>
extends Object

A poor man's implementation of a WeakIdentityConcurrentMap to hold the CacheManager associated ExecutorServices

Author:
Alex Snaps

Nested Class Summary
static interface WeakIdentityConcurrentMap.CleanUpTask<T>
           
 
Constructor Summary
WeakIdentityConcurrentMap()
          Constructor
WeakIdentityConcurrentMap(WeakIdentityConcurrentMap.CleanUpTask<V> cleanUpTask)
          Constructor
 
Method Summary
 void cleanUp()
           
 V get(K key)
           
 Set<K> keySet()
           
 V put(K key, V value)
          Puts into the underlying
 V putIfAbsent(K key, V value)
          Puts into the underlying
 V remove(K key)
          Remove from the underlying
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeakIdentityConcurrentMap

public WeakIdentityConcurrentMap()
Constructor


WeakIdentityConcurrentMap

public WeakIdentityConcurrentMap(WeakIdentityConcurrentMap.CleanUpTask<V> cleanUpTask)
Constructor

Parameters:
cleanUpTask -
Method Detail

put

public V put(K key,
             V value)
Puts into the underlying

Parameters:
key -
value -
Returns:

remove

public V remove(K key)
Remove from the underlying

Parameters:
key -
Returns:

toString

public String toString()

Overrides:
toString in class Object

putIfAbsent

public V putIfAbsent(K key,
                     V value)
Puts into the underlying

Parameters:
key -
value -
Returns:

get

public V get(K key)
Parameters:
key -
Returns:

cleanUp

public void cleanUp()

keySet

public Set<K> keySet()
Returns:

ehcache

Copyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.