aa
|
Public Member Functions | |
UQNodes | add (Node tn) |
UQNodes | addAll (UQNodes uq) |
void | clear () |
Removes all of the mappings from this map. More... | |
void | clear (boolean large) |
NonBlockingHashMapLong< TypeV > | clone () |
Creates a shallow copy of this hashtable. More... | |
boolean | contains (Object val) |
Legacy method testing if some key maps into the specified value in this table. More... | |
boolean | containsKey (long key) |
Tests if the key in the table. More... | |
boolean | containsKey (Object key) |
Auto-boxing version of containsKey(long). More... | |
boolean | containsValue (Object val) |
Returns true if this Map maps one or more keys to the specified value. More... | |
Enumeration< TypeV > | elements () |
Returns an enumeration of the values in this table. More... | |
Set< Map.Entry< Long, TypeV > > | entrySet () |
Returns a Set view of the mappings contained in this map. More... | |
boolean | equals (Object o) |
final TypeV | get (long key) |
Returns the value to which the specified key is mapped, or. More... | |
TypeV | get (Object key) |
Auto-boxing version of get(long). More... | |
int | hashCode () |
Enumeration< Long > | keys () |
Returns an enumeration of the auto-boxed keys in this table. More... | |
Set< Long > | keySet () |
Returns a Set view of the keys contained in this map; with care the keys may be iterated over without auto-boxing. More... | |
long[] | keySetLong () |
Keys as a long array. More... | |
final void | print () |
Verbose printout of table internals, useful for debugging. More... | |
TypeV | put (long key, TypeV val) |
Maps the specified key to the specified value in the table. More... | |
TypeV | put (Long key, TypeV val) |
Auto-boxing version of put. More... | |
TypeV | putIfAbsent (long key, TypeV val) |
Atomically, do a put if-and-only-if the key is not mapped. More... | |
TypeV | putIfAbsent (Long key, TypeV val) |
Auto-boxing version of putIfAbsent. More... | |
TypeV | remove (long key) |
Removes the key (and its corresponding value) from this map. More... | |
boolean | remove (long key, Object val) |
Atomically do a remove(long) if-and-only-if the key is mapped to a value which is equals to the given value. More... | |
TypeV | remove (Object key) |
Auto-boxing version of remove(long). More... | |
boolean | remove (Object key, Object Val) |
Auto-boxing version of remove(long,Object). More... | |
UQNodes | rename (HashMap< Node, Node > map) |
boolean | replace (long key, TypeV oldValue, TypeV newValue) |
Atomically do a put(key,newValue) if-and-only-if the key is mapped a value which is equals to oldValue . More... | |
boolean | replace (Long key, TypeV oldValue, TypeV newValue) |
Auto-boxing version of replace. More... | |
TypeV | replace (long key, TypeV val) |
Atomically do a put(key,val) if-and-only-if the key is mapped to some value already. More... | |
TypeV | replace (Long key, TypeV Val) |
Auto-boxing version of replace. More... | |
long | reprobes () |
Get and clear the current count of reprobes. More... | |
int | size () |
Returns the number of key-value mappings in this map. More... | |
Collection< TypeV > | values () |
Returns a Collection view of the values contained in this map. More... | |
Static Public Member Functions | |
static UQNodes | make (Node tn) |
Private Member Functions | |
final boolean | CAS (final long offset, final Object old, final Object nnn) |
void | help_copy () |
void | initialize (final int initial_sz) |
void | print2 () |
TypeV | putIfMatch (long key, Object newVal, Object oldVal) |
void | readObject (java.io.ObjectInputStream s) throws IOException, ClassNotFoundException |
void | setHash () |
void | writeObject (java.io.ObjectOutputStream s) throws IOException |
Static Private Member Functions | |
static final int | hash (long h) |
static UQNodes | intern () |
static void | print2_impl (final int i, final long K, final Object V) |
static void | print_impl (final int i, final long K, final Object V) |
static long | rawIndex (final long[] ary, final int idx) |
static long | rawIndex (final Object[] ary, final int idx) |
static int | reprobe_limit (int len) |
Private Attributes | |
transient CHM | _chm |
int | _hash |
transient long | _last_resize_milli |
final boolean | _opt_for_space |
transient ConcurrentAutoTable | _reprobes |
transient Object | _val_1 |
Static Private Attributes | |
static final long | _chm_offset |
static final int | _Lbase |
static final int | _Lscale |
static final int | _Obase |
static final int | _Oscale |
static final long | _val_1_offset |
static UQNodes | KEY = new UQNodes() |
static final Object | MATCH_ANY |
static final int | MIN_SIZE |
static final int | MIN_SIZE_LOG |
static final long | NO_KEY |
static final Object | NO_MATCH_OLD |
static final int | REPROBE_LIMIT |
static final long | serialVersionUID |
static final Prime | TOMBPRIME |
static final Object | TOMBSTONE |
static final NonBlockingHashMap< UQNodes, UQNodes > | UQSETS = new NonBlockingHashMap<>() |
Definition at line 8 of file UQNodes.java.
Definition at line 36 of file UQNodes.java.
References com.cliffc.aa.node.Node._uid, com.cliffc.aa.tvar.UQNodes.intern(), com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.tvar.UQNodes.KEY, com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.put(), and com.cliffc.aa.util.NonBlockingHashMapLong< Node >.values().
Referenced by com.cliffc.aa.tvar.TV2._push_update().
Definition at line 47 of file UQNodes.java.
References com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.get(), com.cliffc.aa.tvar.UQNodes.intern(), com.cliffc.aa.tvar.UQNodes.KEY, com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.put(), com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.size(), and com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.values().
Referenced by com.cliffc.aa.tvar.TV2.merge_deps(), and com.cliffc.aa.tvar.TV2.merge_ns().
|
privateinherited |
Definition at line 119 of file NonBlockingHashMapLong.java.
|
inherited |
Removes all of the mappings from this map.
Definition at line 332 of file NonBlockingHashMapLong.java.
|
inherited |
Definition at line 338 of file NonBlockingHashMapLong.java.
|
inherited |
Creates a shallow copy of this hashtable.
All the structure of the hashtable itself is copied, but the keys and values are not cloned. This is a relatively expensive operation.
Definition at line 1290 of file NonBlockingHashMapLong.java.
|
inherited |
Legacy method testing if some key maps into the specified value in this table.
This method is identical in functionality to {}, and exists solely to ensure full compatibility with class java.util.Hashtable}, which supported this method prior to introduction of the Java Collections framework. val a value to search for true
if this map maps one or more keys to the specified value NullPointerException if the specified value is null
Definition at line 268 of file NonBlockingHashMapLong.java.
|
inherited |
Tests if the key in the table.
true
if the key is in the table Definition at line 258 of file NonBlockingHashMapLong.java.
|
inherited |
Auto-boxing version of containsKey(long).
Definition at line 386 of file NonBlockingHashMapLong.java.
|
inherited |
Returns true
if this Map maps one or more keys to the specified value.
Note: This method requires a full internal traversal of the hash table and is much slower than containsKey.
val | value whose presence in this map is to be tested |
true
if this Map maps one or more keys to the specified value NullPointerException | if the specified value is null |
Definition at line 349 of file NonBlockingHashMapLong.java.
|
inherited |
Returns an enumeration of the values in this table.
Definition at line 1102 of file NonBlockingHashMapLong.java.
|
inherited |
Returns a Set view of the mappings contained in this map.
The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove
, Set.remove
, removeAll
, retainAll
, and clear
operations. It does not support the add
or addAll
operations.
The view's iterator
is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.
Warning: the iterator associated with this Set requires the creation of java.util.Map.Entry objects with each iteration. The org.jctools.maps.NonBlockingHashMap does not normally create or using java.util.Map.Entry objects so they will be created soley to support this iteration. Iterating using Map#keySet or Map#values will be more efficient. In addition, this version requires auto-boxing the keys.
Definition at line 1235 of file NonBlockingHashMapLong.java.
boolean com.cliffc.aa.tvar.UQNodes.equals | ( | Object | o | ) |
Definition at line 89 of file UQNodes.java.
References com.cliffc.aa.tvar.UQNodes._hash, com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.get(), com.cliffc.aa.util.NonBlockingHashMapLong< Node >.size(), com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.size(), and com.cliffc.aa.util.NonBlockingHashMapLong< Node >.values().
|
inherited |
Returns the value to which the specified key is mapped, or.
if this map contains no mapping for the key.
More formally, if this map contains a mapping from a key
to a value
such that
, then this method returns
; otherwise it returns
. (There can be at most one such mapping.)
NullPointerException | if the specified key is null |
Definition at line 368 of file NonBlockingHashMapLong.java.
|
inherited |
Auto-boxing version of get(long).
Definition at line 380 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 416 of file NonBlockingHashMapLong.java.
int com.cliffc.aa.tvar.UQNodes.hashCode | ( | ) |
Definition at line 88 of file UQNodes.java.
References com.cliffc.aa.tvar.UQNodes._hash.
|
privateinherited |
Definition at line 403 of file NonBlockingHashMapLong.java.
|
privateinherited |
Definition at line 242 of file NonBlockingHashMapLong.java.
|
staticprivate |
Definition at line 14 of file UQNodes.java.
References com.cliffc.aa.tvar.UQNodes._hash, com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.clear(), com.cliffc.aa.tvar.UQNodes.KEY, com.cliffc.aa.tvar.UQNodes.setHash(), and com.cliffc.aa.tvar.UQNodes.UQSETS.
Referenced by com.cliffc.aa.tvar.UQNodes.add(), com.cliffc.aa.tvar.UQNodes.addAll(), com.cliffc.aa.tvar.UQNodes.make(), and com.cliffc.aa.tvar.UQNodes.rename().
|
inherited |
Returns an enumeration of the auto-boxed keys in this table.
Warning: this version will auto-box all returned keys.
Definition at line 1152 of file NonBlockingHashMapLong.java.
|
inherited |
Returns a Set view of the keys contained in this map; with care the keys may be iterated over without auto-boxing.
The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from this map, via the Iterator.remove
, Set.remove
, removeAll
, retainAll
, and clear
operations. It does not support the add
or addAll
operations.
The view's iterator
is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.
Definition at line 1168 of file NonBlockingHashMapLong.java.
|
inherited |
Keys as a long array.
Array may be zero-padded if keys are concurrently deleted.
Definition at line 1180 of file NonBlockingHashMapLong.java.
Definition at line 28 of file UQNodes.java.
References com.cliffc.aa.node.Node._uid, com.cliffc.aa.tvar.UQNodes.intern(), com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.tvar.UQNodes.KEY, and com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.put().
Referenced by com.cliffc.aa.tvar.TV2._push_update(), com.cliffc.aa.tvar.TV2.make(), com.cliffc.aa.tvar.TV2.make_base(), com.cliffc.aa.tvar.TV2.make_err(), and com.cliffc.aa.tvar.TV2.make_leaf().
|
inherited |
Verbose printout of table internals, useful for debugging.
Definition at line 171 of file NonBlockingHashMapLong.java.
|
privateinherited |
Definition at line 184 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 190 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 177 of file NonBlockingHashMapLong.java.
|
inherited |
Maps the specified key to the specified value in the table.
The value cannot be null.
The value can be retrieved by calling get with a key that is equal to the original key.
key | key with which the specified value is to be associated |
val | value to be associated with the specified key |
key
, or null
if there was no mapping for key
NullPointerException | if the specified value is null |
Definition at line 278 of file NonBlockingHashMapLong.java.
|
inherited |
|
inherited |
Atomically, do a put if-and-only-if the key is not mapped.
Useful to ensure that only a single mapping for the key exists, even if many threads are trying to create the mapping in parallel.
null
if there was no mapping for the key NullPointerException | if the specified is value is null |
Definition at line 286 of file NonBlockingHashMapLong.java.
|
inherited |
|
privateinherited |
Definition at line 312 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 108 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 100 of file NonBlockingHashMapLong.java.
|
privateinherited |
Definition at line 1270 of file NonBlockingHashMapLong.java.
|
inherited |
Removes the key (and its corresponding value) from this map.
This method does nothing if the key is not in the map.
key
, or null
if there was no mapping for key
Definition at line 292 of file NonBlockingHashMapLong.java.
|
inherited |
Atomically do a remove(long) if-and-only-if the key is mapped to a value which is equals
to the given value.
NullPointerException | if the specified value is null |
Definition at line 297 of file NonBlockingHashMapLong.java.
|
inherited |
Auto-boxing version of remove(long).
Definition at line 382 of file NonBlockingHashMapLong.java.
|
inherited |
Auto-boxing version of remove(long,Object).
Definition at line 384 of file NonBlockingHashMapLong.java.
Definition at line 70 of file UQNodes.java.
References com.cliffc.aa.node.Node._uid, com.cliffc.aa.tvar.UQNodes.intern(), com.cliffc.aa.tvar.UQNodes.KEY, com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.put(), and com.cliffc.aa.util.NonBlockingHashMapLong< Node >.values().
Referenced by com.cliffc.aa.tvar.TV2._rename().
|
inherited |
Atomically do a put(key,newValue)
if-and-only-if the key is mapped a value which is equals
to oldValue
.
NullPointerException | if the specified value is null |
Definition at line 307 of file NonBlockingHashMapLong.java.
|
inherited |
Auto-boxing version of replace.
Definition at line 394 of file NonBlockingHashMapLong.java.
|
inherited |
Atomically do a put(key,val)
if-and-only-if the key is mapped to some value already.
NullPointerException | if the specified value is null |
Definition at line 302 of file NonBlockingHashMapLong.java.
|
inherited |
|
staticprivateinherited |
Definition at line 210 of file NonBlockingHashMapLong.java.
|
inherited |
Get and clear the current count of reprobes.
Reprobes happen on key collisions, and a high reprobe rate may indicate a poor hash function or weaknesses in the table resizing function.
Definition at line 202 of file NonBlockingHashMapLong.java.
|
private |
Definition at line 81 of file UQNodes.java.
References com.cliffc.aa.tvar.UQNodes._hash, com.cliffc.aa.util.NonBlockingHashMapLong< Node >.hash(), and com.cliffc.aa.util.NonBlockingHashMapLong< Node >.values().
Referenced by com.cliffc.aa.tvar.UQNodes.intern().
|
inherited |
Returns the number of key-value mappings in this map.
Definition at line 255 of file NonBlockingHashMapLong.java.
|
inherited |
Returns a Collection view of the values contained in this map.
The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding mapping from this map, via the Iterator.remove
, Collection.remove
, removeAll
, retainAll
, and clear
operations. It does not support the add
or addAll
operations.
The view's iterator
is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.
Definition at line 1118 of file NonBlockingHashMapLong.java.
|
privateinherited |
Definition at line 1256 of file NonBlockingHashMapLong.java.
|
privateinherited |
Definition at line 131 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 116 of file NonBlockingHashMapLong.java.
|
private |
Definition at line 11 of file UQNodes.java.
Referenced by com.cliffc.aa.tvar.UQNodes.equals(), com.cliffc.aa.tvar.UQNodes.hashCode(), com.cliffc.aa.tvar.UQNodes.intern(), and com.cliffc.aa.tvar.UQNodes.setHash().
|
privateinherited |
Definition at line 137 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 106 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 107 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 98 of file NonBlockingHashMapLong.java.
|
privateinherited |
Definition at line 140 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 99 of file NonBlockingHashMapLong.java.
|
privateinherited |
Definition at line 196 of file NonBlockingHashMapLong.java.
|
privateinherited |
Definition at line 134 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 117 of file NonBlockingHashMapLong.java.
Definition at line 10 of file UQNodes.java.
Referenced by com.cliffc.aa.tvar.UQNodes.add(), com.cliffc.aa.tvar.UQNodes.addAll(), com.cliffc.aa.tvar.UQNodes.intern(), com.cliffc.aa.tvar.UQNodes.make(), and com.cliffc.aa.tvar.UQNodes.rename().
|
staticprivateinherited |
Definition at line 154 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 146 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 145 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 167 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 151 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 95 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 93 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 162 of file NonBlockingHashMapLong.java.
|
staticprivateinherited |
Definition at line 157 of file NonBlockingHashMapLong.java.
|
staticprivate |
Definition at line 9 of file UQNodes.java.
Referenced by com.cliffc.aa.tvar.UQNodes.intern().