public abstract class AbstractLeaseMap extends Object implements LeaseMap
| Modifier and Type | Field and Description |
|---|---|
protected Map |
map
Map from Lease to Long(duration), where all leases have the same
destination.
|
protected Object |
mapLock |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLeaseMap(Lease lease,
long duration)
Default to using a small HashMap.
|
protected |
AbstractLeaseMap(Map map,
Lease lease,
long duration)
Provide a map of your choice.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkKey(Object key)
Check that the key is valid for this map
|
protected static void |
checkValue(Object value)
Check that the value is a Long
|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set |
entrySet() |
boolean |
equals(Object o) |
Object |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set |
keySet() |
Object |
put(Object key,
Object value) |
void |
putAll(Map m) |
Object |
remove(Object key) |
int |
size() |
Collection |
values() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcancelAll, canContainKey, renewAllcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllprotected final Map map
protected final Object mapLock
protected AbstractLeaseMap(Lease lease, long duration)
lease - duration - protected void checkKey(Object key)
key - protected static void checkValue(Object value)
value - public boolean containsKey(Object key)
containsKey in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic Collection values()
public boolean equals(Object o)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.