Package org.apache.activemq.command
Class ProducerInfo
java.lang.Object
org.apache.activemq.command.BaseCommand
org.apache.activemq.command.ProducerInfo
- All Implemented Interfaces:
Command,DataStructure
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BrokerId[]static final byteprotected ActiveMQDestinationprotected booleanprotected ProducerIdprotected AtomicLongprotected intFields inherited from class org.apache.activemq.command.BaseCommand
commandId, responseRequired -
Constructor Summary
ConstructorsConstructorDescriptionProducerInfo(ProducerId producerId) ProducerInfo(SessionInfo sessionInfo, long producerId) -
Method Summary
Modifier and TypeMethodDescriptioncopy()voidcopy(ProducerInfo info) BrokerId[]The route of brokers the command has moved through.bytelongintUsed to configure the producer window size.voidbooleanIf the broker should dispatch messages from this producer async.voidvoidsetBrokerPath(BrokerId[] brokerPath) voidsetDestination(ActiveMQDestination destination) voidsetDispatchAsync(boolean dispatchAsync) voidsetProducerId(ProducerId producerId) voidsetWindowSize(int windowSize) visit(CommandVisitor visitor) Methods inherited from class org.apache.activemq.command.BaseCommand
copy, getCommandId, getFrom, getTo, isBrokerInfo, isConnectionControl, isConsumerControl, isMarshallAware, isMessage, isMessageAck, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo, toString, toString
-
Field Details
-
DATA_STRUCTURE_TYPE
public static final byte DATA_STRUCTURE_TYPE- See Also:
-
producerId
-
destination
-
brokerPath
-
dispatchAsync
protected boolean dispatchAsync -
windowSize
protected int windowSize -
sentCount
-
-
Constructor Details
-
ProducerInfo
public ProducerInfo() -
ProducerInfo
-
ProducerInfo
-
-
Method Details
-
copy
-
copy
-
getDataStructureType
public byte getDataStructureType()- Returns:
- The type of the data structure
-
getProducerId
-
setProducerId
-
getDestination
-
setDestination
-
createRemoveCommand
-
getBrokerPath
The route of brokers the command has moved through. -
setBrokerPath
-
visit
- Throws:
Exception
-
isDispatchAsync
public boolean isDispatchAsync()If the broker should dispatch messages from this producer async. Since sync dispatch could potentally block the producer thread, this could be an important setting for the producer. -
setDispatchAsync
public void setDispatchAsync(boolean dispatchAsync) -
getWindowSize
public int getWindowSize()Used to configure the producer window size. A producer will send up to the configured window size worth of payload data to the broker before waiting for an Ack that allows him to send more. -
setWindowSize
public void setWindowSize(int windowSize) -
getSentCount
public long getSentCount() -
incrementSentCount
public void incrementSentCount() -
resetSentCount
public void resetSentCount()
-