public class NetworkPublication extends java.lang.Object implements RetransmitSender, DriverManagedResource
| Constructor and Description |
|---|
NetworkPublication(SendChannelEndpoint channelEndpoint,
org.agrona.concurrent.NanoClock nanoClock,
org.agrona.concurrent.EpochClock epochClock,
RawLog rawLog,
org.agrona.concurrent.status.Position publisherLimit,
org.agrona.concurrent.status.Position senderPosition,
int sessionId,
int streamId,
int initialTermId,
int mtuLength,
SystemCounters systemCounters,
FlowControl flowControl,
RetransmitHandler retransmitHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
consumerPosition()
Position of the consumer for this resource.
|
int |
decRef()
Decrement reference count to this resource.
|
void |
delete() |
boolean |
hasReachedEndOfLife()
Has resource reached end of its life and should be reclaimed?
|
int |
incRef()
Increment reference count to this resource.
|
void |
onNak(int termId,
int termOffset,
int length) |
void |
onStatusMessage(int termId,
int termOffset,
int receiverWindowLength,
java.net.InetSocketAddress srcAddress) |
void |
onTimeEvent(long time,
DriverConductor conductor)
Inform resource of time passing and pass it DriverConductor to inform of any state transitions.
|
long |
producerPosition()
Position of the producer for this resource.
|
void |
resend(int termId,
int termOffset,
int length)
Called when a retransmit should be sent
|
int |
send(long now) |
SendChannelEndpoint |
sendChannelEndpoint() |
int |
sessionId() |
int |
streamId() |
long |
timeOfLastStateChange() |
void |
timeOfLastStateChange(long time) |
void |
triggerSendSetupFrame() |
boolean |
unblockAtConsumerPosition()
Unblock the resource at consumer position.
|
public NetworkPublication(SendChannelEndpoint channelEndpoint, org.agrona.concurrent.NanoClock nanoClock, org.agrona.concurrent.EpochClock epochClock, RawLog rawLog, org.agrona.concurrent.status.Position publisherLimit, org.agrona.concurrent.status.Position senderPosition, int sessionId, int streamId, int initialTermId, int mtuLength, SystemCounters systemCounters, FlowControl flowControl, RetransmitHandler retransmitHandler)
public void close()
public int send(long now)
public SendChannelEndpoint sendChannelEndpoint()
public int sessionId()
public int streamId()
public void resend(int termId,
int termOffset,
int length)
RetransmitSenderresend in interface RetransmitSendertermId - for the NAKtermOffset - for the NAKlength - for the NAKpublic void triggerSendSetupFrame()
public void onNak(int termId,
int termOffset,
int length)
public void onStatusMessage(int termId,
int termOffset,
int receiverWindowLength,
java.net.InetSocketAddress srcAddress)
public void onTimeEvent(long time,
DriverConductor conductor)
DriverManagedResourceonTimeEvent in interface DriverManagedResourcetime - now in nanosecondsconductor - to inform of any state transitionspublic boolean hasReachedEndOfLife()
DriverManagedResourcehasReachedEndOfLife in interface DriverManagedResourcepublic void timeOfLastStateChange(long time)
timeOfLastStateChange in interface org.agrona.ManagedResourcepublic long timeOfLastStateChange()
timeOfLastStateChange in interface org.agrona.ManagedResourcepublic void delete()
delete in interface org.agrona.ManagedResourcepublic int decRef()
DriverManagedResourcedecRef in interface DriverManagedResourcepublic int incRef()
DriverManagedResourceincRef in interface DriverManagedResourcepublic long producerPosition()
DriverManagedResourceproducerPosition in interface DriverManagedResourcepublic long consumerPosition()
DriverManagedResourceconsumerPosition in interface DriverManagedResourcepublic boolean unblockAtConsumerPosition()
DriverManagedResourceunblockAtConsumerPosition in interface DriverManagedResourceCopyright © 2014 - 2016 Real Logic Ltd. All Rights Reserved.