|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<T,Lease<T>>
org.simpleframework.util.lease.LeaseMap<T>
public class LeaseMap<T>
The LeaseMap
object is used to map lease keys to the
lease objects managing those objects. This allows components that
are using the leasing framework to associate an object with its
lease and vice versa. Such a capability enables lease renewals to
be performed without the need for a direct handle on the lease.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
LeaseMap()
Constructor for the LeaseMap object. |
|
LeaseMap(int capacity)
Constructor for the LeaseMap object. |
Method Summary | |
---|---|
Lease<T> |
get(java.lang.Object key)
This is used to acquire the Lease object that is
mapped to the specified key. |
Lease<T> |
remove(java.lang.Object key)
This is used to remove the Lease object that is
mapped to the specified key. |
Methods inherited from class java.util.concurrent.ConcurrentHashMap |
---|
clear, contains, containsKey, containsValue, elements, entrySet, isEmpty, keys, keySet, put, putAll, putIfAbsent, remove, replace, replace, size, values |
Methods inherited from class java.util.AbstractMap |
---|
clone, equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public LeaseMap()
LeaseMap
object. This will
create a map for mapping leased resource keys to the leases
that manage them. Having such a map allows leases to be
maintained without having a direct handle on the lease.
public LeaseMap(int capacity)
LeaseMap
object. This will
create a map for mapping leased resource keys to the leases
that manage them. Having such a map allows leases to be
maintained without having a direct handle on the lease.
capacity
- this is the initial capacity of the mapMethod Detail |
---|
public Lease<T> get(java.lang.Object key)
Lease
object that is
mapped to the specified key. Overriding this method ensures
that even without generic parameters a type safe method for
acquiring the registered lease objects can be used.
get
in interface java.util.Map<T,Lease<T>>
get
in class java.util.concurrent.ConcurrentHashMap<T,Lease<T>>
key
- this is the key used to acquire the lease object
public Lease<T> remove(java.lang.Object key)
Lease
object that is
mapped to the specified key. Overriding this method ensures
that even without generic parameters a type safe method for
removing the registered lease objects can be used.
remove
in interface java.util.Map<T,Lease<T>>
remove
in class java.util.concurrent.ConcurrentHashMap<T,Lease<T>>
key
- this is the key used to remove the lease object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |