Class Request

java.lang.Object
oracle.nosql.driver.ops.Request
Direct Known Subclasses:
AddReplicaRequest, DropReplicaRequest, DurableRequest, GetIndexesRequest, GetTableRequest, ListTablesRequest, PrepareRequest, ReadRequest, ReplicaStatsRequest, SystemRequest, SystemStatusRequest, TableRequest, TableUsageRequest

public abstract class Request extends Object
A request is an abstract class used as a base for all requests types. Public state and methods are implemented by extending classes.
  • Method Details

    • getCompartment

      public String getCompartment()
      Returns the compartment id or name. Cloud service only.
      Returns:
      compartment id or name if set for the request
    • getTableName

      public String getTableName()
      Returns the table name to use for the operation.
      Returns:
      the table name, or null if not set
    • getNamespace

      public String getNamespace()
      Returns the namespace to use for the operation. Note: if a namespace is supplied in the table name for the operation, that namespace will override this one.
      Returns:
      the namespace, or null if not set
    • setReadRateLimiter

      public void setReadRateLimiter(RateLimiter rl)
      Sets a read rate limiter to use for this request. Cloud service only.

      This will override any internal rate limiter that may have otherwise been used during request processing, and it will be used regardless of any rate limiter config.

      Parameters:
      rl - the rate limiter instance to use for read operations
    • setWriteRateLimiter

      public void setWriteRateLimiter(RateLimiter rl)
      Sets a write rate limiter to use for this request. Cloud service only.

      This will override any internal rate limiter that may have otherwise been used during request processing, and it will be used regardless of any rate limiter config.

      Parameters:
      rl - the rate limiter instance to use for write operations
    • getReadRateLimiter

      public RateLimiter getReadRateLimiter()
      Returns the read rate limiter instance used during this request. Cloud service only.

      This will be the value supplied via setReadRateLimiter(oracle.nosql.driver.RateLimiter), or if that was not called, it may be an instance of an internal rate limiter that was configured internally during request processing.

      This is supplied for stats and tracing/debugging only. The returned limiter should be treated as read-only.

      Returns:
      the rate limiter instance used for read operations, or null if no limiter was used.
    • getWriteRateLimiter

      public RateLimiter getWriteRateLimiter()
      Returns the write rate limiter instance used during this request. Cloud service only.

      This will be the value supplied via setWriteRateLimiter(oracle.nosql.driver.RateLimiter), or if that was not called, it may be an instance of an internal rate limiter that was configured internally during request processing.

      This is supplied for stats and tracing/debugging only. The returned limiter should be treated as read-only.

      Returns:
      the rate limiter instance used for write operations, or null if no limiter was used.
    • getRetryStats

      public RetryStats getRetryStats()
      Returns a stats object with information about retries. This may be used during a retry handler or after a request has completed or thrown an exception.
      Returns:
      stats object with retry information, or null if no retries were performed.
    • getRateLimitDelayedMs

      public int getRateLimitDelayedMs()
      Get the time the operation was delayed due to rate limiting. Cloud only. If rate limiting is in place, this value will represent the number of milliseconds that the operation was delayed due to rate limiting. If the value is zero, rate limiting did not apply or the operation did not need to wait for rate limiting.
      Returns:
      delay time in milliseconds
      Since:
      5.2.25
    • getTypeName

      public abstract String getTypeName()
      Returns the type name of the request. This is used for stats.
      Returns:
      the type name of the request