public class NetworkPublication extends java.lang.Object implements RetransmitSender, DriverManagedResource, Subscribable
| Modifier and Type | Class and Description |
|---|---|
static class |
NetworkPublication.Status |
| Modifier and Type | Field and Description |
|---|---|
protected long |
cleanPosition |
protected long |
lastConsumerPosition |
protected long |
lastSenderPosition |
protected long |
p1 |
protected long |
p10 |
protected long |
p11 |
protected long |
p12 |
protected long |
p13 |
protected long |
p14 |
protected long |
p15 |
protected long |
p16 |
protected long |
p17 |
protected long |
p18 |
protected long |
p19 |
protected long |
p2 |
protected long |
p20 |
protected long |
p21 |
protected long |
p22 |
protected long |
p23 |
protected long |
p24 |
protected long |
p25 |
protected long |
p26 |
protected long |
p27 |
protected long |
p28 |
protected long |
p29 |
protected long |
p3 |
protected long |
p30 |
protected long |
p31 |
protected long |
p32 |
protected long |
p33 |
protected long |
p34 |
protected long |
p35 |
protected long |
p36 |
protected long |
p37 |
protected long |
p38 |
protected long |
p39 |
protected long |
p4 |
protected long |
p40 |
protected long |
p41 |
protected long |
p42 |
protected long |
p43 |
protected long |
p44 |
protected long |
p45 |
protected long |
p5 |
protected long |
p6 |
protected long |
p7 |
protected long |
p8 |
protected long |
p9 |
protected int |
refCount |
protected boolean |
shouldSendSetupFrame |
protected org.agrona.concurrent.status.ReadablePosition[] |
spyPositions |
protected long |
timeOfLastActivity |
protected long |
timeOfLastConsumerPositionChange |
protected long |
timeOfLastSendOrHeartbeat |
protected long |
timeOfLastSetup |
protected boolean |
trackSenderLimits |
| Constructor and Description |
|---|
NetworkPublication(long registrationId,
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,
org.agrona.concurrent.status.Position senderLimit,
int sessionId,
int streamId,
int initialTermId,
int mtuLength,
SystemCounters systemCounters,
FlowControl flowControl,
RetransmitHandler retransmitHandler,
NetworkPublicationThreadLocals threadLocals,
long unblockTimeoutNs,
boolean isExclusive) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSubscriber(org.agrona.concurrent.status.ReadablePosition spyPosition)
Add a subscriber identified by its position.
|
SendChannelEndpoint |
channelEndpoint() |
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.
|
boolean |
isExclusive() |
int |
mtuLength() |
void |
onNak(int termId,
int termOffset,
int length) |
void |
onRttMeasurement(io.aeron.protocol.RttMeasurementFlyweight msg,
java.net.InetSocketAddress srcAddress) |
void |
onStatusMessage(io.aeron.protocol.StatusMessageFlyweight msg,
java.net.InetSocketAddress srcAddress) |
void |
onTimeEvent(long timeNs,
long timeMs,
DriverConductor conductor)
Inform resource of timeNs passing and pass it DriverConductor to inform of any state transitions.
|
long |
producerPosition()
Position of the producer for this resource.
|
long |
registrationId() |
void |
removeSubscriber(org.agrona.concurrent.status.ReadablePosition spyPosition)
Remove a subscriber identified by its position.
|
void |
resend(int termId,
int termOffset,
int length)
Called when a retransmit should be sent
|
int |
send(long now) |
int |
sessionId() |
NetworkPublication.Status |
status() |
int |
streamId() |
long |
timeOfLastStateChange() |
void |
timeOfLastStateChange(long time) |
void |
triggerSendSetupFrame() |
boolean |
unblockAtConsumerPosition()
Unblock the resource at consumer position.
|
protected long p31
protected long p32
protected long p33
protected long p34
protected long p35
protected long p36
protected long p37
protected long p38
protected long p39
protected long p40
protected long p41
protected long p42
protected long p43
protected long p44
protected long p45
protected long timeOfLastSendOrHeartbeat
protected long timeOfLastSetup
protected boolean trackSenderLimits
protected boolean shouldSendSetupFrame
protected long p16
protected long p17
protected long p18
protected long p19
protected long p20
protected long p21
protected long p22
protected long p23
protected long p24
protected long p25
protected long p26
protected long p27
protected long p28
protected long p29
protected long p30
protected long cleanPosition
protected long timeOfLastActivity
protected long lastSenderPosition
protected long lastConsumerPosition
protected long timeOfLastConsumerPositionChange
protected int refCount
protected org.agrona.concurrent.status.ReadablePosition[] spyPositions
protected long p1
protected long p2
protected long p3
protected long p4
protected long p5
protected long p6
protected long p7
protected long p8
protected long p9
protected long p10
protected long p11
protected long p12
protected long p13
protected long p14
protected long p15
public NetworkPublication(long registrationId,
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,
org.agrona.concurrent.status.Position senderLimit,
int sessionId,
int streamId,
int initialTermId,
int mtuLength,
SystemCounters systemCounters,
FlowControl flowControl,
RetransmitHandler retransmitHandler,
NetworkPublicationThreadLocals threadLocals,
long unblockTimeoutNs,
boolean isExclusive)
public void close()
public int mtuLength()
public long registrationId()
public boolean isExclusive()
public int send(long now)
public SendChannelEndpoint channelEndpoint()
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 addSubscriber(org.agrona.concurrent.status.ReadablePosition spyPosition)
SubscribableaddSubscriber in interface SubscribablespyPosition - for tracking and identifying the subscriber.public void removeSubscriber(org.agrona.concurrent.status.ReadablePosition spyPosition)
SubscribableSubscribable is responsible for calling ReadablePosition.close() on
removed positions.removeSubscriber in interface SubscribablespyPosition - to be identified by.public void onNak(int termId,
int termOffset,
int length)
public void onStatusMessage(io.aeron.protocol.StatusMessageFlyweight msg,
java.net.InetSocketAddress srcAddress)
public void onRttMeasurement(io.aeron.protocol.RttMeasurementFlyweight msg,
java.net.InetSocketAddress srcAddress)
public void onTimeEvent(long timeNs,
long timeMs,
DriverConductor conductor)
DriverManagedResourceonTimeEvent in interface DriverManagedResourcetimeNs - now in nanosecondstimeMs - now in milliseconds for epochconductor - 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 NetworkPublication.Status status()
public long producerPosition()
DriverManagedResourceproducerPosition in interface DriverManagedResourcepublic long consumerPosition()
DriverManagedResourceconsumerPosition in interface DriverManagedResourcepublic boolean unblockAtConsumerPosition()
DriverManagedResourceunblockAtConsumerPosition in interface DriverManagedResourceCopyright © 2014-2017 Real Logic Ltd. All Rights Reserved.