com.bigdata.service
Interface IDataServiceCallable

All Superinterfaces:
IFederationCallable, Serializable
All Known Implementing Classes:
AbstractClientTask, AbstractStepTask, DataServiceCallable, DumpFederation.FetchIndexPartitionByteCountRecordTask, JoinTaskFactoryTask, ListIndicesTask, MoveTask.ReceiveIndexPartitionTask, MutationTask, ProgramTask, QueryTask

public interface IDataServiceCallable
extends IFederationCallable

Interface for procedures that require access to the IDataService and or the federation.

Version:
$Id: IDataServiceCallable.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
IFederationCallable
TODO:
register index and drop index could be rewritten as submitted procedures derived from this class. This would simplify the IDataService API and metrics collection further. The implementations would have to be distinct from RegisterIndexTask and DropIndexTask since those extend AbstractTask - that class does not implement IIndexProcedure and can not be sent across the wire.

Method Summary
 DataService getDataService()
          Return the DataService.
 void setDataService(DataService dataService)
          Invoked before the task is executed to provide a reference to the IDataService on which it is executing.
 
Methods inherited from interface com.bigdata.service.IFederationCallable
getFederation, setFederation
 

Method Detail

setDataService

void setDataService(DataService dataService)
Invoked before the task is executed to provide a reference to the IDataService on which it is executing. This method is also responsible for setting the IBigdataFederation reference using IFederationCallable.setFederation(IBigdataFederation).

Parameters:
dataService - The data service.
Throws:
IllegalArgumentException - if the argument is null
IllegalStateException - if setDataService(DataService) has already been invoked and was set with a different value.

getDataService

DataService getDataService()
Return the DataService.

Returns:
The data service and never null.
Throws:
IllegalStateException - if setDataService(DataService) has not been invoked.


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