com.bigdata.service
Interface IFederationDelegate<T>

Type Parameters:
T - The generic type of the client or service.
All Known Subinterfaces:
IBigdataFederation<T>
All Known Implementing Classes:
AbstractDistributedFederation, AbstractFederation, AbstractScaleOutFederation, ClientService.ClientServiceFederationDelegate, DataService.DataServiceFederationDelegate, DefaultClientDelegate, DefaultServiceFederationDelegate, EmbeddedFederation, JiniFederation, LocalDataServiceFederation, TransactionServer.TransactionServiceFederationDelegate

public interface IFederationDelegate<T>

Interface allowing services to take over handling of events normally handled by the AbstractFederation.

Version:
$Id: IFederationDelegate.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Method Summary
 void didStart()
          Invoked by the AbstractFederation once the deferred startup tasks are executed.
 T getService()
          Return the client or service.
 Class getServiceIface()
          Return the class or interface that is the most interesting facet of the client and which will be used to identify this client in the performance counters reported to the ILoadBalancerService.
 String getServiceName()
          Return a name for the service.
 UUID getServiceUUID()
          The UUID assigned to the IBigdataClient or AbstractService.
 boolean isServiceReady()
          Return true iff the service is ready to start.
 AbstractHTTPD newHttpd(int httpdPort, CounterSet counterSet)
          Create a new AbstractHTTPD instance.
 void reattachDynamicCounters()
          Offers the service an opportunity to dynamically detach and re-attach performance counters.
 void serviceJoin(IService service, UUID serviceUUID)
          Notice that the service has been discovered.
 void serviceLeave(UUID serviceUUID)
          Notice that the service is no longer available.
 

Method Detail

getService

T getService()
Return the client or service.


getServiceName

String getServiceName()
Return a name for the service. It is up to administrators to ensure that service names are unique.

Returns:
A name for the service.

getServiceIface

Class getServiceIface()
Return the class or interface that is the most interesting facet of the client and which will be used to identify this client in the performance counters reported to the ILoadBalancerService.

Returns:
The class or interface and never null.

getServiceUUID

UUID getServiceUUID()
The UUID assigned to the IBigdataClient or AbstractService.

See Also:
AbstractService.setServiceUUID(UUID)

reattachDynamicCounters

void reattachDynamicCounters()
Offers the service an opportunity to dynamically detach and re-attach performance counters. This can be invoked either in response to an http GET or the periodic reporting of performance counters to the ILoadBalancerService. In general, implementations should limit the frequency of update, e.g., to no more than once a second.


isServiceReady

boolean isServiceReady()
Return true iff the service is ready to start.


didStart

void didStart()
Invoked by the AbstractFederation once the deferred startup tasks are executed. Services may use this event to perform additional initialization.


serviceJoin

void serviceJoin(IService service,
                 UUID serviceUUID)
Notice that the service has been discovered. This notice will be generated the first time the service is discovered by a given IBigdataClient.

Parameters:
service - The service.
serviceUUID - The service UUID.

serviceLeave

void serviceLeave(UUID serviceUUID)
Notice that the service is no longer available. This notice will be generated once for a given IBigdataClient when the service is no longer available from any of its service registrars.

Parameters:
serviceUUID - The service UUID.

newHttpd

AbstractHTTPD newHttpd(int httpdPort,
                       CounterSet counterSet)
                       throws IOException
Create a new AbstractHTTPD instance.

Parameters:
port - The port, or zero for a random port.
counterSet - The root CounterSet that will be served up.
Returns:
The httpd daemon.
Throws:
IOException


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