com.bigdata.service
Class AbstractDistributedFederation<T>

java.lang.Object
  extended by com.bigdata.service.AbstractFederation<T>
      extended by com.bigdata.service.AbstractScaleOutFederation<T>
          extended by com.bigdata.service.AbstractDistributedFederation<T>
Type Parameters:
T - The generic type of the client or service.
All Implemented Interfaces:
IIndexManager, IIndexStore, IBigdataFederation<T>, IFederationDelegate<T>
Direct Known Subclasses:
JiniFederation

public abstract class AbstractDistributedFederation<T>
extends AbstractScaleOutFederation<T>

Abstract base class for IBigdataFederation implementations where the services are distributed using RMI and are running, at least in principle, across more than one host/JVM.

Version:
$Id: AbstractDistributedFederation.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
TODO:
Explore a variety of cached and uncached strategies for the metadata index. An uncached strategy is currently used. However, caching may be necessary for some kinds of application profiles, especially as the #of index partitions grows. If an application performs only unisolated and read-committed operations, then a single metadata index cache can be shared by the client for all operations against a given scale-out index. On the other hand, a client that uses transactions or performs historical reads will need to have a view of the metadata index as of the timestamp associated with the transaction or historical read., support failover metadata service discovery.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bigdata.service.AbstractScaleOutFederation
AbstractScaleOutFederation.ForceOverflowTask, AbstractScaleOutFederation.PurgeResourcesTask
 
Nested classes/interfaces inherited from class com.bigdata.service.AbstractFederation
AbstractFederation.ReportTask, AbstractFederation.StartDeferredTasksTask
 
Field Summary
 
Fields inherited from class com.bigdata.service.AbstractScaleOutFederation
metadataIndexCachePolicy
 
Fields inherited from class com.bigdata.service.AbstractFederation
log
 
Constructor Summary
AbstractDistributedFederation(IBigdataClient<T> client)
           
 
Method Summary
abstract
<E> E
getProxy(E obj, boolean enableDGC)
          Return a proxy for an object.
abstract
<E> Future<E>
getProxy(Future<E> future)
          Return a proxy object for a Future suitable for use in an RMI environment.
abstract
<E> IAsynchronousIterator<E>
getProxy(IAsynchronousIterator<E> src, IStreamSerializer<E> serializer, int capacity)
          Return a proxy object for an IAsynchronousIterator suiteable for use in an RMI environment.
abstract
<E> IBuffer<E>
getProxy(IBuffer<E> buffer)
          Return a proxy object for an IBuffer suitable for use in an RMI environment.
 boolean isDistributed()
          Return true iff the federation is distributed (uses RMI and is running, at least in principle, across more than one host/JVM).
 boolean isStable()
          Assumes that the federation is stable through failover services if nothing else.
 
Methods inherited from class com.bigdata.service.AbstractScaleOutFederation
awaitServices, forceOverflow, getIndex, getIndexCache, getMetadataIndex, getMetadataIndexCache, isScaleOut, locatorScan, shutdown, shutdownNow
 
Methods inherited from class com.bigdata.service.AbstractFederation
addScheduledTask, assertOpen, destroy, didStart, dropIndex, getClient, getCounterSet, getDataServices, getExecutorService, getGlobalFileSystem, getGlobalRowStore, getHostCounterSet, getHttpdURL, getIndexCounters, getResourceLocator, getScheduledExecutorService, getService, getServiceCounterPathPrefix, getServiceCounterPathPrefix, getServiceCounterSet, getServiceIface, getServiceName, getServiceUUID, getTaskCounters, getTempStore, isOpen, isServiceReady, newHttpd, reattachDynamicCounters, registerIndex, registerIndex, registerIndex, reportCounters, sendEvent, serviceJoin, serviceLeave
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bigdata.service.IBigdataFederation
getAnyDataService, getDataService, getDataServiceByName, getDataServiceUUIDs, getLastCommitTime, getLoadBalancerService, getMetadataService, getTransactionService
 
Methods inherited from interface com.bigdata.journal.IIndexStore
getResourceLockService
 

Constructor Detail

AbstractDistributedFederation

public AbstractDistributedFederation(IBigdataClient<T> client)
Method Detail

isDistributed

public final boolean isDistributed()
Description copied from interface: IBigdataFederation
Return true iff the federation is distributed (uses RMI and is running, at least in principle, across more than one host/JVM).


isStable

public boolean isStable()
Assumes that the federation is stable through failover services if nothing else.


getProxy

public abstract <E> IAsynchronousIterator<E> getProxy(IAsynchronousIterator<E> src,
                                                      IStreamSerializer<E> serializer,
                                                      int capacity)
Return a proxy object for an IAsynchronousIterator suiteable for use in an RMI environment.

Parameters:
src - The source iterator. Note that the iterator normally visits elements of some array type (chunks).
serializer - The object responsible for (de-)serializing a chunk of elements visited by the iterator.
capacity - The capacity for the internal buffer that is used to asynchronously transfer elements (chunks) from the remote iterator to the client iterator.
Returns:
Either a thick iterator (when the results would fit within a single chunk) or a thin iterator that uses RMI to fetch chunks from the remote IAsynchronousIterator.
Throws:
IllegalArgumentException - if the iterator is null.

getProxy

public abstract <E> Future<E> getProxy(Future<E> future)
Return a proxy object for a Future suitable for use in an RMI environment.

Parameters:
future - The future.
Returns:
The proxy for that future.

getProxy

public abstract <E> IBuffer<E> getProxy(IBuffer<E> buffer)
Return a proxy object for an IBuffer suitable for use in an RMI environment.

Parameters:
buffer - The future.
Returns:
A proxy for that IBuffer that masquerades any RMI exceptions.

getProxy

public abstract <E> E getProxy(E obj,
                               boolean enableDGC)
Return a proxy for an object.

Parameters:
obj - The object.
enableDGC - If distributed garbage collection should be used for the object.
Returns:
The proxy.


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