K
- the key typeV
- the value typepublic class PgxMap<K extends Comparable<K>,V extends Comparable<V>> extends PgxManagedObject
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(K key)
Blocking version of
#containsKeyAsync() . |
PgxFuture<Boolean> |
containsKeyAsync(K key)
Checks if the map contains key.
|
Iterable<Map.Entry<K,V>> |
entries()
Blocking version of
entriesAsync() . |
PgxFuture<Iterable<Map.Entry<K,V>>> |
entriesAsync()
Gets an entry set.
|
V |
get(K key)
Blocking version of
#getAsync() . |
PgxFuture<V> |
getAsync(K key)
Gets the value of a key.
|
PgxGraph |
getGraph()
Gets the PgxGraph this map is bound to.
|
PropertyType |
getKeyType()
Gets the key type.
|
String |
getName() |
MapType |
getType()
Gets the map type.
|
PropertyType |
getValueType()
Gets the value type.
|
Iterable<K> |
keys()
Blocking version of
keysAsync() . |
PgxFuture<Iterable<K>> |
keysAsync() |
boolean |
remove(K key)
Blocking version of
#removeAsync() . |
PgxFuture<Boolean> |
removeAsync(K key)
Removes the entry specified by the given key from the map with the given name.
|
void |
set(K key, V value)
Blocking version of
#setAsync() . |
PgxFuture<Void> |
setAsync(K key, V value)
Sets the value for a key in the map specified by the given name.
|
int |
size()
Blocking version of
sizeAsync() . |
PgxFuture<Integer> |
sizeAsync()
Returns the size of the map
|
String |
toString() |
equals, hashCode
close, destroy, destroyAsync
@Generated(value="src/python/synchronize.py") public boolean containsKey(K key) throws ExecutionException, InterruptedException
#containsKeyAsync()
. Calls #containsKeyAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<Boolean> containsKeyAsync(K key)
key
- the key@Generated(value="src/python/synchronize.py") public Iterable<Map.Entry<K,V>> entries() throws ExecutionException, InterruptedException
entriesAsync()
. Calls entriesAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<Iterable<Map.Entry<K,V>>> entriesAsync()
@Generated(value="src/python/synchronize.py") public V get(K key) throws ExecutionException, InterruptedException
#getAsync()
. Calls #getAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<V> getAsync(K key)
key
-public PgxGraph getGraph()
public PropertyType getKeyType()
public String getName()
getName
in class PgxManagedObject
public MapType getType()
public PropertyType getValueType()
@Generated(value="src/python/synchronize.py") public Iterable<K> keys() throws ExecutionException, InterruptedException
keysAsync()
. Calls keysAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.@Generated(value="src/python/synchronize.py") public boolean remove(K key) throws ExecutionException, InterruptedException
#removeAsync()
. Calls #removeAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<Boolean> removeAsync(K key)
key
- key of the entry in the map to be removed.@Generated(value="src/python/synchronize.py") public void set(K key, V value) throws ExecutionException, InterruptedException
#setAsync()
. Calls #setAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<Void> setAsync(K key, V value)
key
- key of the entryvalue
- new value@Generated(value="src/python/synchronize.py") public int size() throws ExecutionException, InterruptedException
sizeAsync()
. Calls sizeAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public String toString()
toString
in class PgxManagedObject
Copyright © 2015. All rights reserved.