Class Scalar<V>

  • Type Parameters:
    V - the value type
    All Implemented Interfaces:
    java.lang.AutoCloseable

    public class Scalar<V>
    extends PgxManagedObject
    A scalar value.
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in class PgxManagedObject
        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 class Destroyable
        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 class java.lang.Object
      • get

        public V get()
              throws java.util.concurrent.ExecutionException,
                     java.lang.InterruptedException
        Blocking version of getAsync(). Calls getAsync() and waits for the returned PgxFuture 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.
      • set

        public void set​(V value)
                 throws java.util.concurrent.ExecutionException,
                        java.lang.InterruptedException
        Blocking version of setAsync(Object). Calls setAsync(Object) and waits for the returned PgxFuture 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.