K
- the key typeV
- the value typepublic class PgxMap<K,V> extends PgxManagedObject
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(K key)
Blocking version of
containsKeyAsync(Object) . |
PgxFuture<java.lang.Boolean> |
containsKeyAsync(K key)
Checks if the map contains key.
|
java.lang.Iterable<java.util.Map.Entry<K,V>> |
entries()
Blocking version of
entriesAsync() . |
PgxFuture<java.lang.Iterable<java.util.Map.Entry<K,V>>> |
entriesAsync()
Gets an entry set.
|
V |
get(K key)
Blocking version of
getAsync(Object) . |
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.
|
java.lang.String |
getName() |
PropertyType |
getValueType()
Gets the value type.
|
java.lang.Iterable<K> |
keys()
Blocking version of
keysAsync() . |
PgxFuture<java.lang.Iterable<K>> |
keysAsync() |
boolean |
remove(K key)
Blocking version of
removeAsync(Object) . |
PgxFuture<java.lang.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(Object, Object) . |
PgxFuture<java.lang.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<java.lang.Integer> |
sizeAsync()
Returns the size of the map
|
java.lang.String |
toString() |
equals, hashCode
close, destroy, destroyAsync
@Generated(value="src/python/synchronize.py") public boolean containsKey(K key) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
containsKeyAsync(Object)
. Calls containsKeyAsync(Object)
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<java.lang.Boolean> containsKeyAsync(K key)
key
- the key@Generated(value="src/python/synchronize.py") public java.lang.Iterable<java.util.Map.Entry<K,V>> entries() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
entriesAsync()
. Calls entriesAsync()
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<java.lang.Iterable<java.util.Map.Entry<K,V>>> entriesAsync()
@Generated(value="src/python/synchronize.py") public V get(K key) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getAsync(Object)
. Calls getAsync(Object)
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.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 java.lang.String getName()
getName
in class PgxManagedObject
public PropertyType getValueType()
@Generated(value="src/python/synchronize.py") public java.lang.Iterable<K> keys() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
keysAsync()
. Calls keysAsync()
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.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 java.util.concurrent.ExecutionException, java.lang.InterruptedException
removeAsync(Object)
. Calls removeAsync(Object)
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<java.lang.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 java.util.concurrent.ExecutionException, java.lang.InterruptedException
setAsync(Object, Object)
. Calls setAsync(Object, Object)
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<java.lang.Void> setAsync(K key, V value)
key
- key of the entryvalue
- new value@Generated(value="src/python/synchronize.py") public int size() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
sizeAsync()
. Calls sizeAsync()
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<java.lang.Integer> sizeAsync()
public java.lang.String toString()
toString
in class PgxManagedObject
Copyright © 2016, 2017 Oracle Corp. All Rights Reserved.