ID
- the identifier type of this property's entity (node or edge IdType
)K
- the type of this property's entity (node or edge, PgxEntity
)V
- the type of this property (see PropertyType
)public abstract class Property<ID,K extends PgxEntity<ID>,V> extends PgxManagedObject implements java.lang.Cloneable
PgxGraph
.Type | Property and Description |
---|---|
boolean |
isVector
Gets the value of the property vectorProperty.
|
Modifier and Type | Method and Description |
---|---|
void |
fill(V value)
Blocking version of
fillAsync(Object) . |
PgxFuture<java.lang.Void> |
fillAsync(V value)
Fill this property with a given value.
|
V |
get(ID id)
Blocking version of
getAsync(Object) . |
V |
get(K key)
Blocking version of
getAsync(PgxEntity) . |
PgxFuture<V> |
getAsync(ID id)
Gets the property value.
|
PgxFuture<V> |
getAsync(K key)
Gets the property value.
|
EntryIterable<ID,K,V> |
getBottomKValues(int k)
Blocking version of
getBottomKValuesAsync(int) . |
PgxFuture<EntryIterable<ID,K,V>> |
getBottomKValuesAsync(int k)
Gets the bottom k vertex/edge value pairs according to their value.
|
int |
getDimension()
Gets the dimension.
|
EntityType |
getEntityType()
Gets the entity type.
|
PgxGraph |
getGraph()
Gets the graph.
|
java.lang.String |
getName()
Gets the name.
|
EntryIterable<ID,K,V> |
getTopKValues(int k)
Blocking version of
getTopKValuesAsync(int) . |
PgxFuture<EntryIterable<ID,K,V>> |
getTopKValuesAsync(int k)
Gets the top k vertex/edge value pairs according to their value.
|
PropertyType |
getType()
Gets the PropertyType.
|
EntryIterable<ID,K,V> |
getValues()
Blocking version of
getValuesAsync() . |
PgxFuture<EntryIterable<ID,K,V>> |
getValuesAsync()
Gets the values.
|
boolean |
isTransient()
Checks the transient flag of this property.
|
boolean |
isVectorProperty()
Gets the value of the property vectorProperty.
|
void |
rename(java.lang.String newPropertyName)
Blocking version of
renameAsync(String) . |
PgxFuture<java.lang.Void> |
renameAsync(java.lang.String newPropertyName)
Renames this property.
|
void |
set(K key, V value)
Blocking version of
setAsync(PgxEntity, Object) . |
PgxFuture<java.lang.Void> |
setAsync(K key, V value)
Sets a property value.
|
void |
setValues(java.util.Map<K,V> values)
Blocking version of
setValuesAsync(Map) . |
void |
setValues(java.util.Map<K,V> values, V defaultValue)
Blocking version of
setValuesAsync(Map, Object) . |
PgxFuture<java.lang.Void> |
setValuesAsync(java.util.Map<K,V> values)
Sets multiple property values.
|
PgxFuture<java.lang.Void> |
setValuesAsync(java.util.Map<K,V> values, V defaultValue)
Sets multiple property values.
|
long |
size()
Blocking version of
sizeAsync() . |
PgxFuture<java.lang.Long> |
sizeAsync()
Gets the size/length of this property.
|
java.lang.String |
toString() |
equals, hashCode
close, destroy, destroyAsync
public boolean isVectorProperty
public void fill(V value) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
fillAsync(Object)
. Calls fillAsync(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> fillAsync(V value)
value
- the valuepublic V get(ID id) 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 V get(K key) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getAsync(PgxEntity)
. Calls getAsync(PgxEntity)
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(ID id)
id
- the id of the propertypublic PgxFuture<V> getAsync(K key)
key
- the key of the propertypublic EntryIterable<ID,K,V> getBottomKValues(int k) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getBottomKValuesAsync(int)
. Calls getBottomKValuesAsync(int)
and waits for 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<EntryIterable<ID,K,V>> getBottomKValuesAsync(int k)
k
- how many bottom values to retrieve, must be in the range between 0 and number of nodes/edges (inclusive)public int getDimension()
isVectorProperty()
is false
, the dimension will be 0.public EntityType getEntityType()
public PgxGraph getGraph()
public java.lang.String getName()
getName
in class PgxManagedObject
public EntryIterable<ID,K,V> getTopKValues(int k) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getTopKValuesAsync(int)
. Calls getTopKValuesAsync(int)
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<EntryIterable<ID,K,V>> getTopKValuesAsync(int k)
k
- how many top values to retrieve, must be in the range between 0 and number of nodes/edges (inclusive)public PropertyType getType()
public EntryIterable<ID,K,V> getValues() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getValuesAsync()
. Calls getValuesAsync()
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<EntryIterable<ID,K,V>> getValuesAsync()
public boolean isTransient()
true
if this property is transient (session-bound, private), false
otherwise.public boolean isVectorProperty()
public void rename(java.lang.String newPropertyName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
renameAsync(String)
. Calls renameAsync(String)
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> renameAsync(java.lang.String newPropertyName)
newPropertyName
- the new name.public void set(K key, V value) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
setAsync(PgxEntity, Object)
. Calls setAsync(PgxEntity, 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
- the key (vertex/edge) whose property to set.value
- the property value.public void setValues(java.util.Map<K,V> values) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
setValuesAsync(Map)
. Calls setValuesAsync(Map)
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 void setValues(java.util.Map<K,V> values, V defaultValue) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
setValuesAsync(Map, Object)
. Calls setValuesAsync(Map, 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> setValuesAsync(java.util.Map<K,V> values)
values
- the key/value mapping to set.public PgxFuture<java.lang.Void> setValuesAsync(java.util.Map<K,V> values, V defaultValue)
values
- the values to setdefaultValue
- default value if one of the values fails to be putpublic long 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.Long> sizeAsync()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2017 Oracle Corp. All Rights Reserved.