com.bigdata.service
Class LocalDataServiceClient<T>

java.lang.Object
  extended by com.bigdata.service.AbstractClient<T>
      extended by com.bigdata.service.LocalDataServiceClient<T>
Type Parameters:
T - The generic type of the client or service.
All Implemented Interfaces:
IBigdataClient<T>

public class LocalDataServiceClient<T>
extends AbstractClient<T>

Client for a local (embedded) DataService exposed as an IBigdataFederation. Code written to this API is directly portable to scale-out IBigdataFederations (but see below).

The IDataService provides full concurrency control and transaction support, but there is no metadata index so all indices are monolithic (they are never broken into key-range partitions).

Note: since all indices are stored within the same IDataService you can write JOINs that enjoy certain optimizations by obtaining a lock on more than one index at a time. Such JOINs must be written using AbstractTask rather than IIndexProcedure since the latter assumes access to a single index at a time. However, such code is not portable to remote IDataServices nor to a federation that supports key-range partitioned indices.

Version:
$Id: LocalDataServiceClient.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
LocalDataServiceFederation

Nested Class Summary
static interface LocalDataServiceClient.Options
          Options understood by the LocalDataServiceClient.
 
Field Summary
 
Fields inherited from class com.bigdata.service.AbstractClient
log
 
Constructor Summary
LocalDataServiceClient(Properties properties)
           
 
Method Summary
 LocalDataServiceFederation<T> connect()
          Connect to a bigdata federation.
 void disconnect(boolean immediateShutdown)
          Note: This also shutdown the local IDataService.
 LocalDataServiceFederation<T> getFederation()
          Return the connected federation,
 boolean isConnected()
          Return true iff the client is connected to a federation.
 
Methods inherited from class com.bigdata.service.AbstractClient
finalize, getBatchApiOnly, getCollectPlatformStatistics, getCollectQueueStatistics, getDefaultRangeQueryCapacity, getDelegate, getHttpdPort, getIndexCacheCapacity, getIndexCacheTimeout, getLocatorCacheCapacity, getLocatorCacheTimeout, getMaxParallelTasksPerRequest, getMaxStaleLocatorRetries, getProperties, getTaskTimeout, getThreadPoolSize, setDelegate
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalDataServiceClient

public LocalDataServiceClient(Properties properties)
Parameters:
properties -
See Also:
LocalDataServiceClient.Options
Method Detail

isConnected

public boolean isConnected()
Description copied from interface: IBigdataClient
Return true iff the client is connected to a federation.


disconnect

public void disconnect(boolean immediateShutdown)
Note: This also shutdown the local IDataService.

Parameters:
immediateShutdown - When true an immediate shutdown will be performed as described above. Otherwise a normal shutdown will be performed.

getFederation

public LocalDataServiceFederation<T> getFederation()
Description copied from interface: IBigdataClient
Return the connected federation,


connect

public LocalDataServiceFederation<T> connect()
Description copied from interface: IBigdataClient
Connect to a bigdata federation. If the client is already connected, then the existing connection is returned.

Returns:
The object used to access the federation services.


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