|
Oracle NoSQL Database version 11gR2.2.0.26 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.kv.KVStoreConfig
public class KVStoreConfig
Represents the configuration parameters used to create a handle to an existing KV store.
Field Summary | |
---|---|
static int |
DEFAULT_LOB_TIMEOUT
The default timeout value (10000 ms) associated with internal LOB access during operations on LOBs. |
static int |
DEFAULT_OPEN_TIMEOUT
The default open timeout in ms associated with the sockets used to make KVStore requests. |
static int |
DEFAULT_READ_TIMEOUT
The default read timeout in ms associated with the sockets used to make KVStore requests. |
static int |
DEFAULT_REQUEST_TIMEOUT
The default timeout in ms associated with KVStore requests. |
Constructor Summary | |
---|---|
KVStoreConfig(String storeName,
String... helperHostPort)
Creates a config object with the minimum required properties. |
Method Summary | |
---|---|
KVStoreConfig |
clone()
|
Consistency |
getConsistency()
Returns the default read Consistency. |
Durability |
getDurability()
Returns the default write Durability. |
String[] |
getHelperHosts()
Returns the helper host/port pairs. |
String |
getLOBSuffix()
Returns the default suffix associated with LOB keys. |
long |
getLOBTimeout(TimeUnit unit)
Returns the default timeout value (in ms) associated with chunk access during operations on LOBs. |
long |
getLOBVerificationBytes()
Returns the number of trailing bytes of a partial LOB that must be verified against the user supplied LOB stream when resuming a LOB put operation. |
long |
getOpenTimeout(TimeUnit unit)
Deprecated. replaced by getSocketOpenTimeout(java.util.concurrent.TimeUnit) |
RequestLimitConfig |
getRequestLimit()
Returns the configuration describing how the number of active requests to a node are limited. |
long |
getRequestTimeout(TimeUnit unit)
Returns the default request timeout. |
long |
getSocketOpenTimeout(TimeUnit unit)
Returns the socket open timeout. |
long |
getSocketReadTimeout(TimeUnit unit)
Returns the read timeout associated with the sockets used to make requests. |
String |
getStoreName()
Returns the store name. |
KVStoreConfig |
setConsistency(Consistency consistency)
Configures the default read Consistency to be used when a Consistency is not specified for a particular read operation. |
KVStoreConfig |
setDurability(Durability durability)
Configures the default write Durability to be used when a Durability is not specified for a particular write operation. |
KVStoreConfig |
setHelperHosts(String... helperHostPort)
Configures the helper host/port pairs. |
KVStoreConfig |
setLOBSuffix(String lobSuffix)
Configures the default suffix associated with LOB keys. |
KVStoreConfig |
setLOBTimeout(long timeout,
TimeUnit unit)
Configures default timeout value associated with chunk access during operations on LOBs. |
KVStoreConfig |
setLOBVerificationBytes(long lobVerificationBytes)
Configures the number of trailing bytes of a partial LOB that must be verified against the user supplied LOB stream when resuming a putLOB operation. |
KVStoreConfig |
setOpenTimeout(long timeout,
TimeUnit unit)
Deprecated. replaced by setSocketOpenTimeout(long, java.util.concurrent.TimeUnit) |
KVStoreConfig |
setRequestLimit(RequestLimitConfig requestLimitConfig)
Configures the maximum number of requests that can be active for a node in the KVStore. |
KVStoreConfig |
setRequestTimeout(long timeout,
TimeUnit unit)
Configures the default request timeout. |
KVStoreConfig |
setSocketOpenTimeout(long timeout,
TimeUnit unit)
Configures the open timeout used when establishing sockets used to make client requests. |
KVStoreConfig |
setSocketReadTimeout(long timeout,
TimeUnit unit)
Configures the read timeout associated with the underlying sockets used to make client requests. |
KVStoreConfig |
setStoreName(String storeName)
Configures the store name. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_REQUEST_TIMEOUT
public static final int DEFAULT_OPEN_TIMEOUT
public static final int DEFAULT_READ_TIMEOUT
The default read timeout value must be larger than
DEFAULT_REQUEST_TIMEOUT
to ensure that read requests are not
timed out by the socket.
public static final int DEFAULT_LOB_TIMEOUT
Constructor Detail |
---|
public KVStoreConfig(String storeName, String... helperHostPort)
storeName
- the name of the KVStore. The store name is used to
guard against accidental use of the wrong host or port. The store name
must consist entirely of upper or lowercase, letters and digits.helperHostPort
- one or more strings containing the host and port
of an active node in the KVStore. Each string has the format:
hostname:port.Method Detail |
---|
public KVStoreConfig clone()
clone
in class Object
public KVStoreConfig setStoreName(String storeName) throws IllegalArgumentException
storeName
- the name of the KVStore. The store name is used to
guard against accidental use of the wrong host or port. The store name
must consist entirely of upper or lowercase, letters and digits.
IllegalArgumentException
public String getStoreName()
If it is not overridden by calling setStoreName(java.lang.String)
, the
default value is the one specified to the KVStoreConfig
constructor.
public KVStoreConfig setHelperHosts(String... helperHostPort) throws IllegalArgumentException
helperHostPort
- one or more strings containing the host and port
of an active node in the KVStore. Each string has the format:
hostname:port.
IllegalArgumentException
- if no helperHostPort is specified.public String[] getHelperHosts()
If it is not overridden by calling setHelperHosts(java.lang.String...)
, the
default value is the one specified to the KVStoreConfig
constructor.
public KVStoreConfig setSocketOpenTimeout(long timeout, TimeUnit unit) throws IllegalArgumentException
The client does not directly open sockets when making requests. KVStore manages the network connections used to make client requests opening and closing connections as needed.
Please note that the socket timeout applies to any duplicate KVStore handles to the same KVStore within this process.
timeout
- the socket open timeout.unit
- the TimeUnit
of the timeout value.
IllegalArgumentException
- if the timeout value is negative or
zero.DEFAULT_OPEN_TIMEOUT
@Deprecated public KVStoreConfig setOpenTimeout(long timeout, TimeUnit unit) throws IllegalArgumentException
setSocketOpenTimeout(long, java.util.concurrent.TimeUnit)
IllegalArgumentException
public long getSocketOpenTimeout(TimeUnit unit)
If it is not overridden by calling setOpenTimeout(long, java.util.concurrent.TimeUnit)
, the
default value is 5000 milliseconds.
unit
- the TimeUnit
of the returned value. May not be null.
@Deprecated public long getOpenTimeout(TimeUnit unit)
getSocketOpenTimeout(java.util.concurrent.TimeUnit)
public KVStoreConfig setSocketReadTimeout(long timeout, TimeUnit unit) throws IllegalArgumentException
The client does not directly manage sockets when making requests. KVStore manages the network connections used to make client requests opening and closing connections as needed.
Please note that the socket timeout applies to any duplicate KVStore handles to the same KVStore within this process.
timeout
- the socket read timeoutunit
- the TimeUnit
of the timeout value
IllegalArgumentException
- if the timeout is invalidpublic long getSocketReadTimeout(TimeUnit unit)
If it is not overridden by calling setSocketReadTimeout(long, java.util.concurrent.TimeUnit)
, the
default value is 30000 milliseconds.
unit
- the TimeUnit
of the returned value. May not be null.
public KVStoreConfig setRequestTimeout(long timeout, TimeUnit unit) throws IllegalArgumentException
timeout
- the default request timeout.unit
- the TimeUnit
of the timeout value.
IllegalArgumentException
- if the timeout value is negative or
zero.public long getRequestTimeout(TimeUnit unit)
If it is not overridden by calling setRequestTimeout(long, java.util.concurrent.TimeUnit)
, the
default value is DEFAULT_REQUEST_TIMEOUT
.
unit
- the TimeUnit
of the returned value. May not be null.
public KVStoreConfig setConsistency(Consistency consistency) throws IllegalArgumentException
consistency
- the default read Consistency.
IllegalArgumentException
public Consistency getConsistency()
If it is not overridden by calling setConsistency(oracle.kv.Consistency)
, the
default value is Consistency.NONE_REQUIRED
.
public KVStoreConfig setDurability(Durability durability) throws IllegalArgumentException
durability
- the default write Durability.
IllegalArgumentException
public Durability getDurability()
If it is not overridden by calling setDurability(oracle.kv.Durability)
, the
default value is Durability.COMMIT_NO_SYNC
.
public KVStoreConfig setRequestLimit(RequestLimitConfig requestLimitConfig)
The long service times can be due to problems at the node itself, or in the network path to that node. The KVStore request dispatcher will, whenever possible, minimize use of nodes with long service times automatically, by re-routing requests to other nodes that can handle them. So this mechanism provides an additional margin of safety when such re-routing of requests is not possible.
public RequestLimitConfig getRequestLimit()
It returns the default value, documented in RequestLimitConfig
,
if it was not overridden by calling setRequestLimit(oracle.kv.RequestLimitConfig)
.
public long getLOBTimeout(TimeUnit unit)
KVLargeObject.getLOB(oracle.kv.Key, oracle.kv.Consistency, long, java.util.concurrent.TimeUnit)
,
KVLargeObject.putLOB(oracle.kv.Key, java.io.InputStream, oracle.kv.Durability, long, java.util.concurrent.TimeUnit)
public KVStoreConfig setLOBTimeout(long timeout, TimeUnit unit)
timeout
- the open timeout.unit
- the TimeUnit
of the timeout value.
KVLargeObject.getLOB(oracle.kv.Key, oracle.kv.Consistency, long, java.util.concurrent.TimeUnit)
,
KVLargeObject.putLOB(oracle.kv.Key, java.io.InputStream, oracle.kv.Durability, long, java.util.concurrent.TimeUnit)
public String getLOBSuffix()
KVLargeObject
public KVStoreConfig setLOBSuffix(String lobSuffix)
IllegalArgumentException
being thrown if a LOB object is
created with one LOB suffix and is subsequently accessed
when a different suffix is in effect. Write operations using
inconsistent LOB suffixes may result in LOB storage not being reclaimed.
This method should only be used in the rare case that the default LOB suffix value ".lob" is unsuitable.
lobSuffix
- the LOB suffix string. It must be non-null and
have a length > 0.
KVLargeObject
public long getLOBVerificationBytes()
put
operation.
KVLargeObject
public KVStoreConfig setLOBVerificationBytes(long lobVerificationBytes)
putLOB
operation.
lobVerificationBytes
- the number of bytes to be verified. A value
<=0 disables verification.
KVLargeObject
public String toString()
toString
in class Object
|
Oracle NoSQL Database version 11gR2.2.0.26 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |