|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - The generic type of the client or service.public interface IBigdataClient<T>
Interface for clients of a IBigdataFederation.
An application uses a IBigdataClient to connect to an
IBigdataFederation. Once connected, the application uses the
IBigdataFederation for operations against a given federation.
An application can read and write on multiple federations by creating an
IBigdataClient for each federation to which it needs to establish a
connection. In this manner, an application can connect to federations that
are deployed using different service discovery frameworks. However, precisely
how the client is configured to identify the federation depends on the
specific service discovery framework, including any protocol options or
security measures, with which that federation was deployed. Likewise, the
services within a given federation only see those services which belong to
that federation. Therefore federation to federation data transfers MUST go
through a client.
Applications normally work with scale-out indices using the methods defined
by IBigdataFederation to register, drop, or access indices.
An application may use an ITransactionManagerService if needs to use
transactions as opposed to unisolated reads and writes. When the client
requests a transaction, the transaction manager responds with a long integer
containing the transaction identifier - this is simply the unique start time
assigned to that transaction by the transaction manager. The client then
provides that transaction identifier for operations that are isolated within
the transaction. When the client is done with the transaction, it must use
the transaction manager to either abort or commit the transaction.
(Transactions that fail to progress may be eventually aborted.)
When using unisolated operations, the client simply specifies
ITx.UNISOLATED as the timestamp for its operations.
ClientIndexView| Nested Class Summary | |
|---|---|
static interface |
IBigdataClient.Options
Configuration options for IBigdataClients. |
| Method Summary | |
|---|---|
IBigdataFederation<T> |
connect()
Connect to a bigdata federation. |
void |
disconnect(boolean immediateShutdown)
Disconnect from the bigdata federation. |
boolean |
getBatchApiOnly()
When true requests for non-batch API operations will throw
exceptions. |
int |
getDefaultRangeQueryCapacity()
The default capacity when a client issues a range query request. |
IBigdataFederation<T> |
getFederation()
Return the connected federation, |
int |
getIndexCacheCapacity()
The capacity of the client's IIndex proxy cache. |
long |
getIndexCacheTimeout()
The timeout in milliseconds for stale entries in the client's IIndex proxy cache. |
int |
getMaxParallelTasksPerRequest()
The maximum #of tasks that may be submitted in parallel for a single user request. |
int |
getMaxStaleLocatorRetries()
The maximum #of retries when an operation results in a StaleLocatorException. |
Properties |
getProperties()
An object wrapping the properties used to configure the client. |
long |
getTaskTimeout()
The timeout in milliseconds for a task submitted to an IDataService. |
int |
getThreadPoolSize()
The configured #of threads in the client's thread pool. |
boolean |
isConnected()
Return true iff the client is connected to a federation. |
boolean |
isReadConsistent()
|
| Method Detail |
|---|
IBigdataFederation<T> connect()
RuntimeException - if the connection can not be established.IBigdataFederation<T> getFederation()
IllegalStateException - if the client is not connected.void disconnect(boolean immediateShutdown)
Normal shutdown allows any existing client requests to federation services to complete but does not schedule new requests, and then terminates any background processing that is being performed on the behalf of the client (service discovery, etc).
Immediate shutdown terminates any client requests to federation services, and then terminate any background processing that is being performed on the behalf of the client (service discovery, etc).
Note: Immediate shutdown can cause odd exceptions to be logged. Normal shutdown is recommended unless there is a reason to force immediate shutdown.
immediateShutdown - When true an immediate shutdown will be
performed as described above. Otherwise a normal shutdown will
be performed.boolean isConnected()
true iff the client is connected to a federation.
int getThreadPoolSize()
IBigdataClient.Options.CLIENT_THREAD_POOL_SIZEint getDefaultRangeQueryCapacity()
IBigdataClient.Options.CLIENT_RANGE_QUERY_CAPACITYboolean getBatchApiOnly()
true requests for non-batch API operations will throw
exceptions.
IBigdataClient.Options.CLIENT_BATCH_API_ONLYint getMaxStaleLocatorRetries()
StaleLocatorException.
IBigdataClient.Options.CLIENT_MAX_STALE_LOCATOR_RETRIESint getMaxParallelTasksPerRequest()
IBigdataClient.Options.CLIENT_MAX_PARALLEL_TASKS_PER_REQUESTboolean isReadConsistent()
IBigdataClient.Options.CLIENT_READ_CONSISTENTlong getTaskTimeout()
IDataService.
IBigdataClient.Options.CLIENT_TASK_TIMEOUTint getIndexCacheCapacity()
IIndex proxy cache.
IBigdataClient.Options.CLIENT_INDEX_CACHE_CAPACITYlong getIndexCacheTimeout()
IIndex proxy cache.
IBigdataClient.Options.CLIENT_INDEX_CACHE_TIMEOUTProperties getProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||