public abstract class ServiceActor<T extends ServiceActor>
extends org.nustaq.kontraktor.Actor<T>
| Modifier and Type | Field and Description |
|---|---|
protected ServiceArgs |
cmdline |
protected ClusterCfg |
config |
protected DataClient |
dclient |
protected ServiceRegistry |
gravity |
protected Map<String,Object> |
requiredServices |
protected ServiceDescription |
serviceDescription |
static String |
UNCONNECTED |
__cbQueue, __clientConnection, __connections, __currentDispatcher, __mailbox, __mailboxCapacity, __mbCapacity, __publishTarget, __remoteId, __scheduler, __self, __stopped, __ticketMachine, connection, sender, userData, zzRoutingGCEnabled, zzServerMsgCallback| Constructor and Description |
|---|
ServiceActor() |
| Modifier and Type | Method and Description |
|---|---|
org.nustaq.kontraktor.IPromise |
awaitRequiredServices() |
protected abstract ServiceDescription |
createServiceDescription() |
protected String[] |
getAllServiceNames() |
protected ServiceArgs |
getCmdline() |
org.nustaq.kontraktor.IPromise<ClusterCfg> |
getConfig() |
org.nustaq.kontraktor.IPromise<DataClient> |
getDataClient() |
protected int |
getPort() |
protected abstract String[] |
getRequiredServiceNames() |
protected <T extends org.nustaq.kontraktor.Actor> |
getService(String name) |
protected ServiceDescription |
getServiceDescription() |
protected void |
gravityDisconnected() |
void |
heartBeat() |
org.nustaq.kontraktor.IPromise |
init(org.nustaq.kontraktor.remoting.base.ConnectableActor gravityConnectable,
ServiceArgs options,
boolean autoRegister) |
protected boolean |
needsDataCluster() |
protected void |
notifyConfigChanged()
override, config contains updated ClusterCfg
|
protected void |
publishSelf() |
protected void |
registerAtGravity() |
protected void |
requiredSerivceWentDown(ServiceDescription cdr) |
static ServiceActor |
RunTCP(String[] args,
Class<? extends ServiceActor> serviceClazz,
Class<? extends ServiceArgs> argsClazz)
run & connect a service with given cmdline args and classes
|
protected void |
serviceEvent(String eventId,
Object cdr,
Object err) |
__addDeadLetter, __addRemoteConnection, __addStopHandler, __dispatchRemoteCall, __enqueueCall, __getCachedMethod, __removeRemoteConnection, __stop, __stopImpl, __submit, ask, askMsg, asyncstop, checkThread, close, closeCurrentClient, current, cyclic, delayed, execInThreadPool, execute, getActor, getActorRef, getCallbackSize, getConnections, getCurrentDispatcher, getFactory, getMailboxSize, getQSizes, getReport, getScheduler, getSubMonitorables, getUntypedRef, hasStopped, inside, inThread, isCallbackQPressured, isEmpty, isMailboxPressured, isProxy, isPublished, isRemote, isStopped, ping, router$clientPing, self, serialOn, setServerMsgCallback, stop, stopSafeClose, tell, tellMsg, unpublish, zzkrouterLostClient, zzRoutingRefGCAddDeadLetter, all, all, all, allMapped, AsActor, AsActor, AsActor, AsActor, AsUntypedActor, awaitAll, awaitAll, awaitAll, awaitAll, complete, complete, DeadLetters, flow, InThread, isComplete, isCont, isError, isErrorOrComplete, isResult, isTimeout, promise, race, race, reject, resolve, resolve, stream, SubmitDelayed, yield, yield, yieldCallbackspublic static final String UNCONNECTED
protected ServiceRegistry gravity
protected ClusterCfg config
protected ServiceDescription serviceDescription
protected ServiceArgs cmdline
protected DataClient dclient
public static ServiceActor RunTCP(String[] args, Class<? extends ServiceActor> serviceClazz, Class<? extends ServiceArgs> argsClazz)
args - serviceClazz - argsClazz - IllegalAccessExceptionInstantiationExceptionpublic org.nustaq.kontraktor.IPromise init(org.nustaq.kontraktor.remoting.base.ConnectableActor gravityConnectable,
ServiceArgs options,
boolean autoRegister)
public org.nustaq.kontraktor.IPromise<ClusterCfg> getConfig()
public org.nustaq.kontraktor.IPromise<DataClient> getDataClient()
protected void registerAtGravity()
protected void publishSelf()
protected int getPort()
protected ServiceArgs getCmdline()
protected String[] getAllServiceNames()
protected boolean needsDataCluster()
protected abstract String[] getRequiredServiceNames()
protected void notifyConfigChanged()
protected void requiredSerivceWentDown(ServiceDescription cdr)
protected <T extends org.nustaq.kontraktor.Actor> T getService(String name)
public org.nustaq.kontraktor.IPromise awaitRequiredServices()
public void heartBeat()
protected void gravityDisconnected()
protected abstract ServiceDescription createServiceDescription()
protected ServiceDescription getServiceDescription()
Copyright © 2018. All rights reserved.