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
Modifier and TypeFieldDescriptionprotected BrokerId[]
static final byte
protected ActiveMQDestination
protected boolean
protected ProducerId
protected AtomicLong
protected int
Fields inherited from class org.apache.activemq.command.BaseCommand
commandId, responseRequired
-
Constructor Summary
ConstructorDescriptionProducerInfo
(ProducerId producerId) ProducerInfo
(SessionInfo sessionInfo, long producerId) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
void
copy
(ProducerInfo info) BrokerId[]
The route of brokers the command has moved through.byte
long
int
Used to configure the producer window size.void
boolean
If the broker should dispatch messages from this producer async.void
void
setBrokerPath
(BrokerId[] brokerPath) void
setDestination
(ActiveMQDestination destination) void
setDispatchAsync
(boolean dispatchAsync) void
setProducerId
(ProducerId producerId) void
setWindowSize
(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()
-