public class TimedResourceMap<K,V extends TimedResource> extends java.lang.Object implements java.util.Map<K,TimedResource>
Modifier and Type | Class and Description |
---|---|
class |
TimedResourceMap.Terminator
Thread that monitors a
TimedResourceMap and removes members (@link SelfTerminatingValue) that have reached their life expectancy |
Constructor and Description |
---|
TimedResourceMap() |
TimedResourceMap(java.util.concurrent.ConcurrentHashMap<K,com.ibm.tivoli.oslc.util.timedresource.TimedResourceMap.SelfTerminatingValue> envoy,
int lifespan,
int terminationInterval) |
TimedResourceMap(int lifespan,
int terminationInterval) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,TimedResource>> |
entrySet() |
boolean |
equals(java.lang.Object obj) |
TimedResource |
get(java.lang.Object key) |
int |
getLifeSpan() |
int |
getTerminatorInterval() |
TimedResourceMap.Terminator |
getTerminatorThread() |
int |
hashCode() |
boolean |
isEmpty() |
java.util.Enumeration |
keys() |
java.util.Set<K> |
keySet() |
TimedResource |
put(K key,
TimedResource value) |
void |
putAll(java.util.Map<? extends K,? extends TimedResource> map) |
TimedResource |
remove(java.lang.Object key) |
void |
setLifeSpan(int timeToLive) |
void |
setTerminationInterval(int terminationInterval) |
int |
size() |
java.util.Collection<TimedResource> |
values() |
public TimedResourceMap()
public TimedResourceMap(int lifespan, int terminationInterval)
public TimedResourceMap(java.util.concurrent.ConcurrentHashMap<K,com.ibm.tivoli.oslc.util.timedresource.TimedResourceMap.SelfTerminatingValue> envoy, int lifespan, int terminationInterval)
public void clear()
clear
in interface java.util.Map<K,TimedResource>
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<K,TimedResource>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<K,TimedResource>
public java.util.Set<java.util.Map.Entry<K,TimedResource>> entrySet()
entrySet
in interface java.util.Map<K,TimedResource>
public TimedResource get(java.lang.Object key)
get
in interface java.util.Map<K,TimedResource>
public boolean isEmpty()
isEmpty
in interface java.util.Map<K,TimedResource>
public java.util.Set<K> keySet()
keySet
in interface java.util.Map<K,TimedResource>
public TimedResource put(K key, TimedResource value)
put
in interface java.util.Map<K,TimedResource>
public int hashCode()
hashCode
in interface java.util.Map<K,TimedResource>
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Map<K,TimedResource>
equals
in class java.lang.Object
public void putAll(java.util.Map<? extends K,? extends TimedResource> map)
putAll
in interface java.util.Map<K,TimedResource>
public TimedResource remove(java.lang.Object key)
remove
in interface java.util.Map<K,TimedResource>
public int size()
size
in interface java.util.Map<K,TimedResource>
public java.util.Collection<TimedResource> values()
values
in interface java.util.Map<K,TimedResource>
public java.util.Enumeration keys()
public TimedResourceMap.Terminator getTerminatorThread()
public int getTerminatorInterval()
public int getLifeSpan()
public void setTerminationInterval(int terminationInterval)
public void setLifeSpan(int timeToLive)