Class BatchedMessageSender
java.lang.Object
com.atlassian.bamboo.v2.build.agent.remote.sender.BatchedMessageSender
- All Implemented Interfaces:
BambooAgentMessageSender
A sender strategy that batches the messages up in a queue and periodically flushes the queue.
-
Constructor Summary
ConstructorDescriptionBatchedMessageSender
(BambooAgentMessageSender delegate, HomeDirectoryLayout homeDirectoryLayout, ObjectSerialiserDispatcher objectSerialiserDispatcher) -
Method Summary
Modifier and TypeMethodDescriptionvoid
flush()
Flush outgoing messages.@Nullable Object
send
(@NotNull BambooAgentMessage message) Sends aBambooAgentMessage
, and any others that have been submitted but not yet sent, to the server immediately.void
submit
(@NotNull BambooAgentMessage message) Submits aBambooAgentMessage
to be sent to the server when convenient.
-
Constructor Details
-
BatchedMessageSender
public BatchedMessageSender(BambooAgentMessageSender delegate, HomeDirectoryLayout homeDirectoryLayout, ObjectSerialiserDispatcher objectSerialiserDispatcher)
-
-
Method Details
-
send
Description copied from interface:BambooAgentMessageSender
Sends a
BambooAgentMessage
, and any others that have been submitted but not yet sent, to the server immediately.- Specified by:
send
in interfaceBambooAgentMessageSender
- Parameters:
message
- TheBambooAgentMessage
to send.
-
submit
Description copied from interface:BambooAgentMessageSender
Submits a
BambooAgentMessage
to be sent to the server when convenient.- Specified by:
submit
in interfaceBambooAgentMessageSender
- Parameters:
message
- TheBambooAgentMessage
to submit.
-
flush
public void flush()Description copied from interface:BambooAgentMessageSender
Flush outgoing messages.- Specified by:
flush
in interfaceBambooAgentMessageSender
-