public class ElasticTopic extends Topic
Modifier and Type | Class and Description |
---|---|
(package private) class |
ElasticTopic.TopicDesc |
Modifier and Type | Field and Description |
---|---|
private boolean |
isRoot
True if topic is head of the elastic topic tree.
|
private List<ElasticTopic.TopicDesc> |
pool
Pool of topics to forward msgs to.
|
private static long |
serialVersionUID |
private int |
subId
Index of topic to forward next subscription to.
|
fatherId, friends, logger, nbMsgsReceiveSinceCreation, selectors, subscribers
_rights, clients, creationDate, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, strbuf, strictCounters, task, temporary, WRITE
agentProfiling, emptyString, fixed, logmon
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
Constructor and Description |
---|
ElasticTopic() |
Modifier and Type | Method and Description |
---|---|
private Message |
createReconnectionMessage(int tid) |
protected void |
doClientMessages(AgentId from,
ClientMessages not,
boolean throwsExceptionOnFullDest)
Method specifically processing a
ClientMessages instance. |
void |
handleAdminRequestNot(AgentId from,
FwdAdminRequestNot not)
This method handles the scaling operations.
|
private void |
handleClientSubscriptionNot(AgentId from,
ClientSubscriptionNot not)
If root, redirects subscriptions to proper topic.
|
private void |
handleGetSubscriptionsRequest(FwdAdminRequestNot not) |
private void |
handleScaleRequest(FwdAdminRequestNot not) |
void |
react(AgentId from,
Notification not)
Distributes the received notifications to the appropriate reactions.
|
void |
setProperties(Properties properties,
boolean firstTime)
Sets the configuration of a
Destination . |
clusterJoin, clusterJoinAck, createTopicForward, doDeleteNot, doRightRequest, doUnknownAgent, finalize, forwardMessages, forwardMessages, getClusterElements, getNbMsgsReceiveSinceCreation, getNumberOfSubscribers, getStats, getSubscriberIds, getTxName, getType, initialize, postSubscribe, postUnsubscribe, preSubscribe, preUnsubscribe, processMessages, sendToCluster, subscribeRequest, topicForwardNot, toString, unsubscribeRequest, wakeUpNot
agentFinalize, agentInitialize, clientMessages, decode, delete, deleteNot, encode, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQAgentId, getDMQId, getEncodedSize, getJMXStatistics, getMBeanName, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getRights, handleDeniedMessage, interceptorsAvailable, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isValidJMXAttribute, isWriter, postProcess, preProcess, processAdminCommand, processInterceptors, processPause, processSetRight, processStartHandler, processStopHandler, replyToTopic, requestGroupNot, setAdminId, setFreeReading, setFreeWriting, setPeriod, setRight, unknownAgent
agentSave, delete, delete, deploy, deploy, getAgentId, getCommitTime, getEncodableClassId, getId, getLogTopic, getName, getReactNb, getReactTime, hasName, incWorkInProgress, isAgentProfiling, isDeployed, isFixed, isUpdated, needToBeCommited, resetCommitTime, resetReactTime, resetTimer, save, sendTo, sendTo, sendTo, setAgentProfiling, setName, setNoSave, setSave
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod
getAgentId, getCommitTime, getReactNb, getReactTime, isAgentProfiling, isFixed, resetCommitTime, resetReactTime, resetTimer, setAgentProfiling
private static final long serialVersionUID
private List<ElasticTopic.TopicDesc> pool
private boolean isRoot
private int subId
public void setProperties(Properties properties, boolean firstTime) throws Exception
Destination
Destination
. Be careful, this is
done a first time before Agent.deploy()
, so the agent is serialized and
initialized afterwards.setProperties
in class Destination
properties
- The initial set of properties.Exception
public void handleAdminRequestNot(AgentId from, FwdAdminRequestNot not)
public void react(AgentId from, Notification not) throws Exception
Topic
protected void doClientMessages(AgentId from, ClientMessages not, boolean throwsExceptionOnFullDest)
Topic
ClientMessages
instance.
This method may forward the messages to the topic father if any, or
to the cluster fellows if any.It may finally send
TopicMsgsReply
instances to the valid subscribers.
doClientMessages
in class Topic
private void handleGetSubscriptionsRequest(FwdAdminRequestNot not)
private void handleScaleRequest(FwdAdminRequestNot not)
private void handleClientSubscriptionNot(AgentId from, ClientSubscriptionNot not)
from
- should be the local default user agent.not
- Notification of a new client subscriptions.private Message createReconnectionMessage(int tid)
Copyright © 2022 ScalAgent D.T.. All rights reserved.