public class DistributionQueue extends Queue implements DistributionQueueMBean
DistributionQueue
class implements the MOM distribution queue
behavior, delivering messages via the DistributionModule
.Queue.QueueFactory
Modifier and Type | Field and Description |
---|---|
private boolean |
batchDistribution
Tells if we try to distribute the each message each time (true) or if the
distribution is stopped on first error (false).
|
static long |
DEFAULT_PERIOD
Default period used to clean queue and re-distribute failing messages.
|
private String |
distributionClassName
The acquisition class name.
|
private DistributionDaemon |
distributionDaemon |
private DistributionModule |
distributionModule |
private boolean |
isAsyncDistribution
Tells if daemon distribution is active.
|
static org.objectweb.util.monolog.api.Logger |
logger |
protected long |
nbMsgsReceiveSinceCreation |
private Properties |
properties |
private static long |
serialVersionUID
define serialVersionUID for interoperability
|
ARRIVAL_STATE_PREFIX, arrivalState, cload, defaultDMQId, defaultRedeliveryDelay, defaultThreshold, delayedMessageCount, DELIVERY_TABLE_PREFIX, deliveryTable, hcons, hprod, logmsg, messages, msgTxPrefix, msgTxPrefixLength, nbExpirations, nbMaxMsg, nbMsgsDeniedSinceCreation, pload, receiving, requests
_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 |
---|
DistributionQueue() |
Modifier and Type | Method and Description |
---|---|
void |
agentFinalize(boolean lastTime)
Finalizes the agent before it is garbaged.
|
String |
dumpProperties() |
int |
getEncodableClassId()
Enables the sub classes not to implement this method.
|
long |
getNbMsgsDeliverSinceCreation()
Returns the number of messages delivered since creation time of this
destination.
|
long |
getNbMsgsReceiveSinceCreation()
Returns the number of messages received since creation time of this
destination.
|
void |
initialize(boolean firstTime)
Initializes the destination.
|
private boolean |
isAsyncDistribution(Properties properties) |
protected void |
postProcess(ClientMessages cm)
This method is needed to add processing after the standard handling.
|
ClientMessages |
preProcess(AgentId from,
ClientMessages cm)
This method is needed to add processing before the standard handling.
|
protected void |
processSetRight(AgentId user,
int right)
set user right.
|
private void |
removeAndDeleteMessage(String id) |
private void |
removeAndDeleteMessages() |
void |
setProperties(Properties properties,
boolean firstTime)
Configures a
DistributionQueue instance. |
String |
toString()
Returns a string representation of this destination.
|
void |
wakeUpNot(WakeUpNot not)
wake up, and cleans the queue.
|
abortReceiveRequest, acknowledgeRequest, addClientMessages, addDeliveryTimeMessage, addMessage, agentSave, browseRequest, checkDelivery, cleanPendingMessage, cleanPendingMessage, cleanWaitingRequest, cleanWaitingRequest, decode, deliverMessages, denyRequest, doClientMessages, doDeleteNot, doRightRequest, doUnknownAgent, encode, finalize, getClientMessages, getConsumerLoad, getDefaultDMQId, getDefaultRedeliveryDelay, getDefaultThreshold, getDelayedMessageCount, getDeliveredMessageCount, getDeliveryDelay, getEncodedSize, getMessage, getMessages, getMessagesView, getMsgTxPrefix, getNbMaxMsg, getNbMsgsDeniedSinceCreation, getPendingMessageCount, getProducerLoad, getQueueMessage, getRedeliveryDelay, getStats, getThreshold, getType, getWaitingRequestCount, handleAdminRequestNot, handleExpiredNot, isPause, isSyncExceptionOnFullDest, isUndeliverable, isValidJMXAttribute, messageDelivered, messageRemoved, processDeliveryTime, react, receiveRequest, setDefaultRedeliveryDelay, setDeliveryDelay, setMsgTxName, setNbMaxMsg, setPause, setRedeliveryDelay, setSyncExceptionOnFullDest, setThreshold, storeMessage, storeMessageHeader
agentInitialize, clientMessages, delete, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQAgentId, getDMQId, getJMXStatistics, getMBeanName, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getRights, handleDeniedMessage, interceptorsAvailable, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isWriter, processAdminCommand, processInterceptors, processPause, processStartHandler, processStopHandler, replyToTopic, requestGroupNot, setAdminId, setFreeReading, setFreeWriting, setPeriod, setRight, unknownAgent
delete, delete, deploy, deploy, getAgentId, getCommitTime, getId, getLogTopic, getName, getReactNb, getReactTime, hasName, 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
cleanPendingMessage, cleanWaitingRequest, getConsumerLoad, getDelayedMessageCount, getDeliveredMessageCount, getDeliveryDelay, getMessage, getMessages, getNbMaxMsg, getNbMsgsDeniedSinceCreation, getPendingMessageCount, getProducerLoad, getRedeliveryDelay, getThreshold, getWaitingRequestCount, isPause, setDeliveryDelay, setNbMaxMsg, setPause, setRedeliveryDelay, setThreshold
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getType, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod
getAgentId, getCommitTime, getReactNb, getReactTime, isAgentProfiling, isFixed, resetCommitTime, resetReactTime, resetTimer, setAgentProfiling
public static org.objectweb.util.monolog.api.Logger logger
public static final long DEFAULT_PERIOD
private static final long serialVersionUID
private transient DistributionModule distributionModule
private transient DistributionDaemon distributionDaemon
private String distributionClassName
private boolean batchDistribution
private boolean isAsyncDistribution
private Properties properties
protected long nbMsgsReceiveSinceCreation
public String dumpProperties()
dumpProperties
in interface DistributionQueueMBean
public void setProperties(Properties properties, boolean firstTime) throws Exception
DistributionQueue
instance.setProperties
in class Queue
properties
- The initial set of properties.Exception
private boolean isAsyncDistribution(Properties properties)
public void initialize(boolean firstTime) throws Exception
Queue
initialize
in class Queue
firstTime
- true when first called by the factoryException
public void agentFinalize(boolean lastTime)
Destination
agentFinalize
in class Destination
lastTime
- true if the destination is deletedpublic final long getNbMsgsReceiveSinceCreation()
Destination
getNbMsgsReceiveSinceCreation
in interface DestinationMBean
getNbMsgsReceiveSinceCreation
in class Queue
public final long getNbMsgsDeliverSinceCreation()
Destination
getNbMsgsDeliverSinceCreation
in interface DestinationMBean
getNbMsgsDeliverSinceCreation
in class Queue
public ClientMessages preProcess(AgentId from, ClientMessages cm)
Destination
Queue
and Topic
.
The incoming messages can be modified or deleted during the processing.preProcess
in class Destination
from
- The sender of the messagecm
- The incoming messages.private void removeAndDeleteMessages()
private void removeAndDeleteMessage(String id)
protected void postProcess(ClientMessages cm)
Destination
Queue
and Topic
.
The incoming messages can be modified or deleted during the processing.postProcess
in class Destination
cm
- The incoming messages.public String toString()
Queue
toString
in interface AgentMBean
toString
in interface DestinationMBean
toString
in class Queue
public void wakeUpNot(WakeUpNot not)
protected void processSetRight(AgentId user, int right) throws RequestException
Destination
processSetRight
in class Destination
RequestException
public int getEncodableClassId()
Agent
getEncodableClassId
in interface Encodable
getEncodableClassId
in class Queue
Copyright © 2020 ScalAgent D.T.. All rights reserved.