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.
|
MapIterable<K,V> |
entries()
Blocking version of
entriesAsync() . |
PgxFuture<MapIterable<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() |
java.lang.String |
getSessionId()
Gets the session id this map is bound to.
|
PropertyType |
getValueType()
Gets the value type.
|
java.lang.Iterable<K> |
keys()
Blocking version of
keysAsync() . |
PgxFuture<java.lang.Iterable<K>> |
keysAsync() |
void |
put(K key,
V value)
Blocking version of
putAsync(Object, Object) . |
PgxFuture<java.lang.Void> |
putAsync(K key,
V value)
Sets the value for a key in the map specified by the given name.
|
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.
|
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
public boolean containsKey(K key)
containsKeyAsync(Object)
. Calls containsKeyAsync(Object)
and waits
for the returned PgxFuture
to complete.public PgxFuture<java.lang.Boolean> containsKeyAsync(K key)
key
- the keypublic MapIterable<K,V> entries()
entriesAsync()
. Calls entriesAsync()
and waits for the returned
PgxFuture
to complete.public PgxFuture<MapIterable<K,V>> entriesAsync()
public V get(K key)
getAsync(Object)
. Calls getAsync(Object)
and waits for the
returned PgxFuture
to complete.public PgxFuture<V> getAsync(K key)
key
- public PgxGraph getGraph()
public PropertyType getKeyType()
public java.lang.String getName()
getName
in class PgxManagedObject
public java.lang.String getSessionId()
public PropertyType getValueType()
public java.lang.Iterable<K> keys()
keysAsync()
. Calls keysAsync()
and waits for the returned PgxFuture
to complete.public void put(K key, V value)
putAsync(Object, Object)
. Calls putAsync(Object, Object)
and waits for the returned PgxFuture
to complete.public PgxFuture<java.lang.Void> putAsync(K key, V value)
key
- key of the entryvalue
- new valuepublic boolean remove(K key)
removeAsync(Object)
. Calls removeAsync(Object)
and waits for the
returned PgxFuture
to complete.public PgxFuture<java.lang.Boolean> removeAsync(K key)
key
- key of the entry in the map to be removed.public int size()
sizeAsync()
. Calls sizeAsync()
and waits for the returned PgxFuture
to complete.public PgxFuture<java.lang.Integer> sizeAsync()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2015 - 2020 Oracle and/or its affiliates. All Rights Reserved.