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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KVStoreFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static KVStore` | `getStore(KVStoreConfig config)` Get a handle to an existing KVStore.
    `static KVStore` | `getStore(KVStoreConfig config, LoginCredentials creds, ReauthenticateHandler reauthHandler)` Get a handle to an existing KVStore, with optional authentication arguments for accessing a secure KVStore instance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KVStoreFactory

          public KVStoreFactory()

  - ### Method Detail

    - #### 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.
      Parameters:
        `config` - the KVStore configuration parameters.
      Throws:
        `IllegalArgumentException` - if an illegal configuration parameter is specified.
        `FaultException`

    - #### 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.

      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.login` 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`

Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.