Package oracle.kv

Class KVStoreFactory

java.lang.Object
oracle.kv.KVStoreFactory

public class KVStoreFactory extends Object
Factory class used to produce handles to an existing KVStore.
  • Field Details

    • ENDPOINT_GROUP_NUM_THREADS_PROPERTY

      public static final String ENDPOINT_GROUP_NUM_THREADS_PROPERTY
      The name of the system property that can be set to specify the number of threads to use for the async endpoint group. The number should be an integer greater than zero. If this property is not set, the async endpoint group uses twice the number of available processors as determined by calling Runtime.availableProcessors().
      Since:
      19.5
      See Also:
    • ENDPOINT_GROUP_MAX_QUIESCENT_SECONDS_PROPERTY

      public static final String ENDPOINT_GROUP_MAX_QUIESCENT_SECONDS_PROPERTY
      The name of the system property that can be set to specify the maximum amount of time in seconds for a endpoint group thread to be quiescent before it is shut down. The number should be an integer greater than zero. Default to 60 if this property is not set.
      Since:
      20.1
      See Also:
  • Constructor Details

    • KVStoreFactory

      public KVStoreFactory()
  • Method Details

    • getStore

      public static KVStore getStore(KVStoreConfig config) throws FaultException
      Get a handle to an existing KVStore. Note that the KVStore itself can only be created via the KV administration console or API. The application must invoke KVStore.close(), when it is done accessing the store, to free up resources associated with the handle.
      Parameters:
      config - the KVStore configuration parameters.
      Throws:
      IllegalArgumentException - if an illegal configuration parameter is specified.
      FaultException
      See Also:
    • getStore

      public static KVStore getStore(KVStoreConfig config, LoginCredentials creds, ReauthenticateHandler reauthHandler) throws FaultException
      Get a handle to an existing KVStore, with optional authentication arguments for accessing a secure KVStore instance. Note that the KVStore itself can only be created via the KV administration console or API. The application must invoke KVStore.close(), when it is done accessing the store, to free up resources associated with the handle.

      If no LoginCredentials are provided in this call, this method will attempt to locate credentials through other sources, in the following search order.

      1. KVStoreConfig.getLoginProperties()
      2. A login file referenced by the oracle.kv.security Java system property.

      Parameters:
      config - the KVStore configuration parameters.
      creds - the KVStore user login credentials. If null, the KVStore client will attempt to locate credentials based on Java system properties.
      reauthHandler - an optional re-authentication handler to be used in the event a login session expires and must be renewed. If both creds and reauthHandler are null, but login information is located using either of the above lookup methods, an internally-supplied reauthentication handler is automatically provided which will re-read login credentials as needed for reauthentication. User passwords are not retained in memory by the KVStore client, so if you explicitly provide LoginCredentials, you are also responsible for supplying a reauthentication handler, if desired.
      Throws:
      IllegalArgumentException - if an illegal configuration parameter is specified.
      FaultException
      See Also: