Package oracle.pgx.api
Class Scalar<V>
- java.lang.Object
-
- oracle.pgx.api.internal.ApiObject
-
- oracle.pgx.api.Destroyable
-
- oracle.pgx.api.PgxManagedObject
-
- oracle.pgx.api.Scalar<V>
-
- Type Parameters:
V
- the value type
- All Implemented Interfaces:
java.lang.AutoCloseable
public class Scalar<V> extends PgxManagedObject
A scalar value.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PgxFuture<java.lang.Void>
destroyAsync()
Requests destruction of this object.V
get()
Blocking version ofgetAsync()
.PgxFuture<V>
getAsync()
int
getDimension()
PgxGraph
getGraph()
Gets the graph the scalar is bound to.java.lang.String
getName()
PropertyType
getType()
Gets the type of this Scalar.void
set(V value)
Blocking version ofsetAsync(Object)
.PgxFuture<java.lang.Void>
setAsync(V value)
Sets the scalar value.java.lang.String
toString()
-
Methods inherited from class oracle.pgx.api.PgxManagedObject
equals, hashCode
-
Methods inherited from class oracle.pgx.api.Destroyable
close, destroy
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in classPgxManagedObject
- Returns:
- the name identifying this managed object
-
getGraph
public PgxGraph getGraph()
Gets the graph the scalar is bound to.- Returns:
- graph
-
destroyAsync
public PgxFuture<java.lang.Void> destroyAsync()
Description copied from class:Destroyable
Requests destruction of this object. After this method returns, the behavior of any method of this class becomes undefined.- Specified by:
destroyAsync
in classDestroyable
- Returns:
- a future which will be completed once the destruction request finishes.
-
getType
public PropertyType getType()
Gets the type of this Scalar.- Returns:
- the type
-
getDimension
public int getDimension()
-
setAsync
public PgxFuture<java.lang.Void> setAsync(V value)
Sets the scalar value.- Parameters:
value
- the value to be assigned
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
get
public V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
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.
-
set
public void set(V value) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofsetAsync(Object)
. CallssetAsync(Object)
and waits for the returnedPgxFuture
to complete.- Throws:
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.
-
-