public abstract class AbstractDelegatingSubscriber<T extends BaseSubscriber> extends Object implements BaseSubscriber
Constructor and Description |
---|
AbstractDelegatingSubscriber(T subscriber) |
Modifier and Type | Method and Description |
---|---|
protected T |
delegate() |
long |
index()
Returns the last index seen by this IndexAware.
|
void |
index(long index)
Sets the last index seen by this IndexAware.
|
boolean |
isIndexAware()
Returns if this BaseSubscriber implements
BaseSubscriber.index() and
BaseSubscriber.index(long) . |
boolean |
isTcpBufferFullEnough()
Returns if this TcpAware has a TCP/IP buffer that should
not be filled with more data.
|
void |
onEndOfSubscription()
This method is invoked by Datagrid upon
end of subscription.
|
public AbstractDelegatingSubscriber(@NotNull T subscriber)
protected T delegate()
public void onEndOfSubscription()
BaseSubscriber
onEndOfSubscription
in interface BaseSubscriber
public boolean isTcpBufferFullEnough()
BaseSubscriber
isTcpBufferFullEnough
in interface BaseSubscriber
public boolean isIndexAware()
BaseSubscriber
BaseSubscriber.index()
and
BaseSubscriber.index(long)
.isIndexAware
in interface BaseSubscriber
BaseSubscriber.index()
and
BaseSubscriber.index(long)
public long index()
BaseSubscriber
The index is guaranteed to be set prior to invocation
of any onMessage()
method.
This is an optional method that is only implemented for
BaseSubscriber instances that returns true
when
BaseSubscriber.isIndexAware()
is invoked.
If implemented, This method is invoked by Datagrid upon end of bootstrapping.
index
in interface BaseSubscriber
public void index(long index)
BaseSubscriber
This is an optional method that is only implemented for
BaseSubscriber instances that returns true
when
BaseSubscriber.isIndexAware()
is invoked.
index
in interface BaseSubscriber
Copyright © 2021. All rights reserved.