public class PacketSendBuffer extends Object implements FCPublisher
| Modifier and Type | Field and Description |
|---|---|
static long |
CHECK_PACKET_RATE_BULKSEND_THRESHOLD |
static boolean |
DEBUG_LAT |
static String |
KEEP_SUBS_NODEID |
long |
lastMsgFlush |
static int |
RETRANS_MEM |
static boolean |
RETRANSDEBUG |
| Constructor and Description |
|---|
PacketSendBuffer(PhysicalTransport trans,
String nodeId,
Topic entry) |
| Modifier and Type | Method and Description |
|---|---|
FCPublisher |
batchOnLimit(boolean doBatch)
decides wether to start batching once rate limit is reached.
|
void |
flush() |
void |
free() |
int |
getPacketRateLimit() |
Topic |
getTopicEntry() |
int |
getTopicId() |
protected void |
initDropMsgPacket(String nodeId) |
boolean |
isBatchOnLimit(boolean doBatch) |
boolean |
isUnordered() |
boolean |
offer(String receiverNodeId,
byte[] b,
int start,
int len,
boolean doFlush) |
boolean |
offer(String subscriberNodeId,
org.nustaq.offheap.bytez.ByteSource msg,
boolean doFlush) |
boolean |
offer(String receiverNodeId,
org.nustaq.offheap.bytez.ByteSource msg,
long start,
int len,
boolean doFlush) |
protected boolean |
offerNoLock(String receiverNodeId,
org.nustaq.offheap.bytez.ByteSource msg,
long start,
int len,
boolean doFlush) |
void |
setPacketRateLimit(int limit) |
void |
setUnordered(boolean unordered) |
public static long CHECK_PACKET_RATE_BULKSEND_THRESHOLD
public static boolean RETRANSDEBUG
public static final String KEEP_SUBS_NODEID
public static boolean DEBUG_LAT
public static int RETRANS_MEM
public volatile long lastMsgFlush
public PacketSendBuffer(PhysicalTransport trans, String nodeId, Topic entry)
protected void initDropMsgPacket(String nodeId)
public void free()
public Topic getTopicEntry()
public boolean isUnordered()
public void setUnordered(boolean unordered)
protected boolean offerNoLock(String receiverNodeId, org.nustaq.offheap.bytez.ByteSource msg, long start, int len, boolean doFlush)
public boolean offer(String receiverNodeId, byte[] b, int start, int len, boolean doFlush)
offer in interface FCPublisherreceiverNodeId - - null for all subscribers of topic, a nodeId for a specific subscriber (unicast)public boolean offer(String receiverNodeId, org.nustaq.offheap.bytez.ByteSource msg, long start, int len, boolean doFlush)
offer in interface FCPublisherpublic boolean offer(String subscriberNodeId, org.nustaq.offheap.bytez.ByteSource msg, boolean doFlush)
offer in interface FCPublisherpublic int getTopicId()
getTopicId in interface FCPublisherpublic void setPacketRateLimit(int limit)
setPacketRateLimit in interface FCPublisherpublic int getPacketRateLimit()
getPacketRateLimit in interface FCPublisherpublic FCPublisher batchOnLimit(boolean doBatch)
FCPublisherbatchOnLimit in interface FCPublisherpublic boolean isBatchOnLimit(boolean doBatch)
isBatchOnLimit in interface FCPublisherpublic void flush()
flush in interface FCPublisherCopyright © 2014. All rights reserved.