com.bigdata.service
Class AbstractClient<T>

java.lang.Object
  extended by com.bigdata.service.AbstractClient<T>
All Implemented Interfaces:
IBigdataClient<T>
Direct Known Subclasses:
AbstractScaleOutClient

public abstract class AbstractClient<T>
extends Object
implements IBigdataClient<T>

Abstract base class for IBigdataClient implementations.

Version:
$Id: AbstractClient.java 5872 2012-01-25 15:00:36Z thompsonbry $
Author:
Bryan Thompson

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.bigdata.service.IBigdataClient
IBigdataClient.Options
 
Field Summary
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
protected AbstractClient(Properties properties)
           
 
Method Summary
protected  void finalize()
          Extended to IBigdataClient.disconnect(boolean) if the client is still connected when it is finalized.
 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.
 IFederationDelegate<T> getDelegate()
          The delegate for the 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 getLocatorCacheCapacity()
           
 long getLocatorCacheTimeout()
           
 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 isReadConsistent()
           
 void setDelegate(IFederationDelegate<T> delegate)
          Set the delegate for the federation.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bigdata.service.IBigdataClient
connect, disconnect, getFederation, isConnected
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Constructor Detail

AbstractClient

protected AbstractClient(Properties properties)
Parameters:
properties - See IBigdataClient.Options
Method Detail

getProperties

public Properties getProperties()
Description copied from interface: IBigdataClient
An object wrapping the properties used to configure the client.

Specified by:
getProperties in interface IBigdataClient<T>

getThreadPoolSize

public int getThreadPoolSize()
Description copied from interface: IBigdataClient
The configured #of threads in the client's thread pool.

Specified by:
getThreadPoolSize in interface IBigdataClient<T>
See Also:
IBigdataClient.Options.CLIENT_THREAD_POOL_SIZE

getDefaultRangeQueryCapacity

public int getDefaultRangeQueryCapacity()
Description copied from interface: IBigdataClient
The default capacity when a client issues a range query request.

Specified by:
getDefaultRangeQueryCapacity in interface IBigdataClient<T>
See Also:
IBigdataClient.Options.CLIENT_RANGE_QUERY_CAPACITY

getBatchApiOnly

public boolean getBatchApiOnly()
Description copied from interface: IBigdataClient
When true requests for non-batch API operations will throw exceptions.

Specified by:
getBatchApiOnly in interface IBigdataClient<T>
See Also:
IBigdataClient.Options.CLIENT_BATCH_API_ONLY

getMaxStaleLocatorRetries

public int getMaxStaleLocatorRetries()
Description copied from interface: IBigdataClient
The maximum #of retries when an operation results in a StaleLocatorException.

Specified by:
getMaxStaleLocatorRetries in interface IBigdataClient<T>
See Also:
IBigdataClient.Options.CLIENT_MAX_STALE_LOCATOR_RETRIES

getMaxParallelTasksPerRequest

public int getMaxParallelTasksPerRequest()
Description copied from interface: IBigdataClient
The maximum #of tasks that may be submitted in parallel for a single user request.

Specified by:
getMaxParallelTasksPerRequest in interface IBigdataClient<T>
See Also:
IBigdataClient.Options.CLIENT_MAX_PARALLEL_TASKS_PER_REQUEST

isReadConsistent

public boolean isReadConsistent()
Specified by:
isReadConsistent in interface IBigdataClient<T>
See Also:
IBigdataClient.Options.CLIENT_READ_CONSISTENT

getTaskTimeout

public long getTaskTimeout()
Description copied from interface: IBigdataClient
The timeout in milliseconds for a task submitted to an IDataService.

Specified by:
getTaskTimeout in interface IBigdataClient<T>
See Also:
IBigdataClient.Options.CLIENT_TASK_TIMEOUT

getLocatorCacheCapacity

public int getLocatorCacheCapacity()

getLocatorCacheTimeout

public long getLocatorCacheTimeout()

getIndexCacheCapacity

public int getIndexCacheCapacity()
Description copied from interface: IBigdataClient
The capacity of the client's IIndex proxy cache.

Specified by:
getIndexCacheCapacity in interface IBigdataClient<T>
See Also:
IBigdataClient.Options.CLIENT_INDEX_CACHE_CAPACITY

getIndexCacheTimeout

public long getIndexCacheTimeout()
Description copied from interface: IBigdataClient
The timeout in milliseconds for stale entries in the client's IIndex proxy cache.

Specified by:
getIndexCacheTimeout in interface IBigdataClient<T>
See Also:
IBigdataClient.Options.CLIENT_INDEX_CACHE_TIMEOUT

getDelegate

public final IFederationDelegate<T> getDelegate()
The delegate for the federation.


setDelegate

public final void setDelegate(IFederationDelegate<T> delegate)
Set the delegate for the federation.

Parameters:
delegate - The delegate.
Throws:
IllegalArgumentException - if the argument is null.
IllegalStateException - if the property has already been set to a different value.
IllegalStateException - if the client is already connected.

finalize

protected void finalize()
                 throws Throwable
Extended to IBigdataClient.disconnect(boolean) if the client is still connected when it is finalized.

Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.