|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.DefaultServiceFederationDelegate<T>
public class DefaultServiceFederationDelegate<T extends AbstractService>
Basic delegate for services that need to override the service UUID and
service interface reported to the ILoadBalancerService.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
|
protected T |
service
|
| Constructor Summary | |
|---|---|
DefaultServiceFederationDelegate(T service)
|
|
| Method Summary | |
|---|---|
void |
didStart()
NOP |
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()
Returns true |
protected void |
logHttpdURL(File file)
Writes the URL of the local httpd service for the DataService
onto a file named httpd.url in the specified directory. |
AbstractHTTPD |
newHttpd(int httpdPort,
ICounterSetAccess access)
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)
NOP |
void |
serviceLeave(UUID serviceUUID)
NOP |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
protected final T extends AbstractService service
| Constructor Detail |
|---|
public DefaultServiceFederationDelegate(T service)
| Method Detail |
|---|
public T getService()
IFederationDelegate
getService in interface IFederationDelegate<T extends AbstractService>public String getServiceName()
IFederationDelegate
getServiceName in interface IFederationDelegate<T extends AbstractService>public UUID getServiceUUID()
IFederationDelegateUUID assigned to the IBigdataClient or
AbstractService.
getServiceUUID in interface IFederationDelegate<T extends AbstractService>AbstractService.setServiceUUID(UUID)public Class getServiceIface()
IFederationDelegateILoadBalancerService.
getServiceIface in interface IFederationDelegate<T extends AbstractService>null.public void reattachDynamicCounters()
IFederationDelegateILoadBalancerService. In general, implementations should limit
the frequency of update, e.g., to no more than once a second.
Note: For most purposes, this has been replaced by
ICounterSetAccess which is now passed into
CounterSetHTTPD. That provides the necessary indirection for
periodic refresh of the performance counters. The CounterSetHTTPD
now also handles the limitation on the update frequency for the
materialized counters.
However, there are still some counters which need to be dynamically reattached. For example, any counter set which is dynamic in its structure, such as the DirectBufferPool.
reattachDynamicCounters in interface IFederationDelegate<T extends AbstractService>public boolean isServiceReady()
true
isServiceReady in interface IFederationDelegate<T extends AbstractService>public void didStart()
didStart in interface IFederationDelegate<T extends AbstractService>
public void serviceJoin(IService service,
UUID serviceUUID)
serviceJoin in interface IFederationDelegate<T extends AbstractService>service - The service.serviceUUID - The service UUID.public void serviceLeave(UUID serviceUUID)
serviceLeave in interface IFederationDelegate<T extends AbstractService>serviceUUID - The service UUID.
public AbstractHTTPD newHttpd(int httpdPort,
ICounterSetAccess access)
throws IOException
IFederationDelegateAbstractHTTPD instance.
newHttpd in interface IFederationDelegate<T extends AbstractService>access - Used to materialize the CounterSet that will be served
up.
IOExceptionprotected void logHttpdURL(File file)
DataService
onto a file named httpd.url in the specified directory.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||