|
|||||
FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Serializable class for barrier lock *
Field Summary | |
---|---|
int |
DEFAULT_INITIAL_CAPACITY
|
float |
DEFAULT_LOAD_FACTOR
|
int |
MAXIMUM_CAPACITY
|
int |
MINIMUM_CAPACITY
|
BarrierLock |
barrierLock
|
int |
count
|
Set |
entrySet
|
Set |
keySet
|
Object |
lastWrite
|
float |
loadFactor
|
def |
table
|
int |
threshold
|
Collection |
values
|
Constructor Summary | |
BarrierLock()
|
Method Summary | |
---|---|
def |
ConcurrentReaderHashMap(int initialCapacity, float loadFactor)
Constructs a new, empty map with the specified initial capacity and the specified load factor. |
def |
ConcurrentReaderHashMap(int initialCapacity)
Constructs a new, empty map with the specified initial capacity and default load factor. |
def |
ConcurrentReaderHashMap()
Constructs a new, empty map with a default initial capacity and load factor. |
def |
ConcurrentReaderHashMap(Map t)
Constructs a new map with the same mappings as the given map. |
void |
clear()
Removes all mappings from this map. |
Object |
clone()
Returns a shallow copy of this ConcurrentReaderHashMap instance: the keys and values themselves are not cloned. |
boolean |
contains(Object value)
Tests if some key maps into the specified value in this table. |
boolean |
containsKey(Object key)
Tests if the specified object is a key in this table. |
boolean |
containsValue(Object value)
Returns true if this map maps one or more keys to the specified value. |
boolean |
eq(Object x, Object y)
Check for equality of non-null references x and y. |
Object |
get(Object key)
Returns the value to which the specified key is mapped in this table. |
def |
getTableForReading()
Get ref to table; the reference and the cells it accesses will be at least as fresh as from last use of barrierLock |
static int |
hash(Object x)
Return hash code for Object x. |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
Set |
keySet()
Returns a set view of the keys contained in this map. |
int |
p2capacity(int initialCapacity)
The default initial number of table slots for this table (32). |
Object |
put(Object key, Object value)
Maps the specified key to the specified
value in this table.
|
void |
putAll(Map t)
Copies all of the mappings from the specified map to this one. |
void |
recordModification(Object x)
Lock used only for its memory effects. |
void |
rehash()
Rehashes the contents of this map into a new table with a larger capacity. |
Object |
remove(Object key)
Removes the key (and its corresponding value) from this table. |
int |
size()
Returns the number of key-value mappings in this map. |
Object |
sput(Object key, Object value, int hash)
Continuation of put(), called only when synch lock is held and interference has been detected. |
Object |
sremove(Object key, int hash)
Continuation of remove(), called only when synch lock is held and interference has been detected. |
Constructor Detail |
---|
BarrierLock()
Method Detail |
---|
public def ConcurrentReaderHashMap(int initialCapacity, float loadFactor)
public def ConcurrentReaderHashMap(int initialCapacity)
public def ConcurrentReaderHashMap()
public def ConcurrentReaderHashMap(Map t)
public void clear()
public Object clone()
public boolean contains(Object value)
containsKey
method.Note that this method is identical in functionality to containsValue, (which is part of the Map interface in the collections framework).
true
if and only if some key maps to thevalue
argument in this table as
determined by the equals method;
false
otherwise.
null
.
public boolean containsKey(Object key)
true
if and only if the specified object false
otherwise.
null
.
public boolean containsValue(Object value)
null
.
boolean eq(Object x, Object y)
public Object get(Object key)
null
if the key is not mapped to any value in
this table.
null
.
def getTableForReading()
static int hash(Object x)
public boolean isEmpty()
public Set keySet()
int p2capacity(int initialCapacity)
public Object put(Object key, Object value)
key
to the specified
value
in this table. Neither the key nor the
value can be null
.
The value can be retrieved by calling the get
method
with a key that is equal to the original key.
null
if it did not have one.
null
.
public void putAll(Map t)
void recordModification(Object x)
void rehash()
public Object remove(Object key)
null
if the key did not have a mapping.
null
.
public int size()
Object sput(Object key, Object value, int hash)
Object sremove(Object key, int hash)