Class Job

  • All Implemented Interfaces:
    java.util.concurrent.CompletionStage<java.lang.Void>, java.util.concurrent.Future<java.lang.Void>

    public class Job
    extends java.util.concurrent.CompletableFuture<java.lang.Void>
    A subclass of CompletableFuture representing an asynchronous operation of the ADB Graph client.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Job.LogEntry
      A log entry of a job.
      static class  Job.Status
      The job status
      static class  Job.Type
      The type of job
      • Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture

        java.util.concurrent.CompletableFuture.AsynchronousCompletionTask
    • Constructor Summary

      Constructors 
      Constructor Description
      Job​(oracle.pg.rdbms.internal.adb.GraphStudioClient client, long id, java.lang.String name, java.lang.String description, Job.Type type, Job.Status status, java.lang.String createdBy, java.lang.String error, java.util.List<Job.LogEntry> logEntries)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      oracle.pg.rdbms.internal.adb.GraphStudioClient getClient()  
      java.lang.String getCreatedBy()
      The database username who created this job.
      java.lang.String getDescription()
      The job description.
      java.lang.String getError()
      An optional error message returned by the server.
      long getId()
      The job ID.
      java.util.List<Job.LogEntry> getLogEntries()
      List of log entries emitted by this job.
      java.lang.String getName()
      The job name.
      Job.Status getStatus()
      The job status.
      Job.Type getType()
      The job type.
      Job poll()
      Starts polling the server using a background thread using AdbGraphClientConfiguration.getExecutorService() and updates this job's status and log as results come in.
      • Methods inherited from class java.util.concurrent.CompletableFuture

        acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Job

        public Job​(oracle.pg.rdbms.internal.adb.GraphStudioClient client,
                   long id,
                   java.lang.String name,
                   java.lang.String description,
                   Job.Type type,
                   Job.Status status,
                   java.lang.String createdBy,
                   java.lang.String error,
                   java.util.List<Job.LogEntry> logEntries)
    • Method Detail

      • poll

        public Job poll()
        Starts polling the server using a background thread using AdbGraphClientConfiguration.getExecutorService() and updates this job's status and log as results come in. Once job completes, fails or gets cancelled, this CompletableFuture is marked as such as well. If this job has completed, this method will do nothing.
        Returns:
        this job
      • getClient

        public oracle.pg.rdbms.internal.adb.GraphStudioClient getClient()
      • getId

        public long getId()
        The job ID.
        Returns:
        the ID of this job.
      • getName

        public java.lang.String getName()
        The job name.
        Returns:
        the name of this job.
      • getDescription

        public java.lang.String getDescription()
        The job description.
        Returns:
        the description of this job.
      • getType

        public Job.Type getType()
        The job type.
        Returns:
        the type of this job.
      • getStatus

        public Job.Status getStatus()
        The job status.
        Returns:
        the status of this job.
      • getCreatedBy

        public java.lang.String getCreatedBy()
        The database username who created this job.
        Returns:
        the username of the creator of this job.
      • getError

        public java.lang.String getError()
        An optional error message returned by the server.
        Returns:
        an error message in case this job has completed unsuccessfully or NULL if job is still running or completed successfully
      • getLogEntries

        public java.util.List<Job.LogEntry> getLogEntries()
        List of log entries emitted by this job.
        Returns:
        the list of log entries.