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
public class ProducerInfo extends BaseCommand
-
-
Field Summary
Fields Modifier and Type Field Description protected BrokerId[]brokerPathstatic byteDATA_STRUCTURE_TYPEprotected ActiveMQDestinationdestinationprotected booleandispatchAsyncprotected ProducerIdproducerIdprotected AtomicLongsentCountprotected intwindowSize-
Fields inherited from class org.apache.activemq.command.BaseCommand
commandId, responseRequired
-
-
Constructor Summary
Constructors Constructor Description ProducerInfo()ProducerInfo(ProducerId producerId)ProducerInfo(SessionInfo sessionInfo, long producerId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProducerInfocopy()voidcopy(ProducerInfo info)RemoveInfocreateRemoveCommand()BrokerId[]getBrokerPath()The route of brokers the command has moved through.bytegetDataStructureType()ActiveMQDestinationgetDestination()ProducerIdgetProducerId()longgetSentCount()intgetWindowSize()Used to configure the producer window size.voidincrementSentCount()booleanisDispatchAsync()If the broker should dispatch messages from this producer async.voidresetSentCount()voidsetBrokerPath(BrokerId[] brokerPath)voidsetDestination(ActiveMQDestination destination)voidsetDispatchAsync(boolean dispatchAsync)voidsetProducerId(ProducerId producerId)voidsetWindowSize(int windowSize)Responsevisit(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 Detail
-
DATA_STRUCTURE_TYPE
public static final byte DATA_STRUCTURE_TYPE
- See Also:
- Constant Field Values
-
producerId
protected ProducerId producerId
-
destination
protected ActiveMQDestination destination
-
brokerPath
protected BrokerId[] brokerPath
-
dispatchAsync
protected boolean dispatchAsync
-
windowSize
protected int windowSize
-
sentCount
protected AtomicLong sentCount
-
-
Constructor Detail
-
ProducerInfo
public ProducerInfo()
-
ProducerInfo
public ProducerInfo(ProducerId producerId)
-
ProducerInfo
public ProducerInfo(SessionInfo sessionInfo, long producerId)
-
-
Method Detail
-
copy
public ProducerInfo copy()
-
copy
public void copy(ProducerInfo info)
-
getDataStructureType
public byte getDataStructureType()
- Returns:
- The type of the data structure
-
getProducerId
public ProducerId getProducerId()
-
setProducerId
public void setProducerId(ProducerId producerId)
-
getDestination
public ActiveMQDestination getDestination()
-
setDestination
public void setDestination(ActiveMQDestination destination)
-
createRemoveCommand
public RemoveInfo createRemoveCommand()
-
getBrokerPath
public BrokerId[] getBrokerPath()
The route of brokers the command has moved through.
-
setBrokerPath
public void setBrokerPath(BrokerId[] brokerPath)
-
visit
public Response visit(CommandVisitor visitor) throws Exception
- 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()
-
-