public abstract class SinkTcp extends Object
Modifier and Type | Field and Description |
---|---|
protected ChronicleQueueBuilder.ReplicaChronicleQueueBuilder |
builder |
protected org.slf4j.Logger |
logger |
protected String |
name |
protected AtomicBoolean |
running |
Modifier | Constructor and Description |
---|---|
protected |
SinkTcp(String name,
ChronicleQueueBuilder.ReplicaChronicleQueueBuilder builder) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
debugString() |
abstract boolean |
isLocalhost() |
boolean |
isOpen() |
boolean |
open() |
boolean |
open(boolean blocking) |
protected abstract SocketChannel |
openSocketChannel() |
int |
read(ByteBuffer buffer) |
boolean |
read(ByteBuffer buffer,
int size) |
boolean |
read(ByteBuffer buffer,
int threshod,
int size) |
boolean |
read(ByteBuffer buffer,
int threshod,
int size,
int readCount) |
boolean |
readAllOrNone(ByteBuffer buffer,
int readCount) |
boolean |
readAtLeast(ByteBuffer buffer,
int size,
int readCount) |
void |
readAvailable(ByteBuffer bb) |
void |
readFullyOrEOF(ByteBuffer bb) |
boolean |
readUpTo(ByteBuffer buffer,
int size,
int readCount) |
protected void |
setSocketChannel(SocketChannel socketChannel) |
SocketChannel |
socketChannel() |
String |
toString() |
int |
write(ByteBuffer buffer) |
void |
writeAction(ByteBuffer buffer,
long action,
long index) |
void |
writeAll(ByteBuffer bb) |
void |
writeAll(net.openhft.lang.io.DirectByteBufferBytes bb) |
void |
writeAllOrEOF(ByteBuffer bb) |
void |
writeAllOrEOF(net.openhft.lang.io.DirectByteBufferBytes bb) |
void |
writeSizeAndIndex(ByteBuffer buffer,
int action,
long index) |
protected final org.slf4j.Logger logger
protected final String name
protected final AtomicBoolean running
protected final ChronicleQueueBuilder.ReplicaChronicleQueueBuilder builder
protected SinkTcp(String name, ChronicleQueueBuilder.ReplicaChronicleQueueBuilder builder)
public boolean open() throws IOException
IOException
public boolean open(boolean blocking) throws IOException
IOException
public void close() throws IOException
IOException
public abstract boolean isLocalhost()
protected abstract SocketChannel openSocketChannel() throws IOException
IOException
protected void setSocketChannel(SocketChannel socketChannel) throws IOException
IOException
public SocketChannel socketChannel()
public boolean isOpen()
public String debugString()
public int write(ByteBuffer buffer) throws IOException
IOException
public void writeAllOrEOF(net.openhft.lang.io.DirectByteBufferBytes bb) throws IOException
IOException
public void writeAllOrEOF(ByteBuffer bb) throws IOException
IOException
public void writeAll(net.openhft.lang.io.DirectByteBufferBytes bb) throws IOException
IOException
public void writeAll(ByteBuffer bb) throws IOException
IOException
public int read(ByteBuffer buffer) throws IOException
IOException
public boolean read(ByteBuffer buffer, int size) throws IOException
IOException
public boolean read(ByteBuffer buffer, int threshod, int size) throws IOException
IOException
public boolean read(ByteBuffer buffer, int threshod, int size, int readCount) throws IOException
IOException
public boolean readAtLeast(ByteBuffer buffer, int size, int readCount) throws IOException
IOException
public boolean readAllOrNone(ByteBuffer buffer, int readCount) throws IOException
IOException
public void readFullyOrEOF(@NotNull ByteBuffer bb) throws IOException
IOException
public void readAvailable(@NotNull ByteBuffer bb) throws IOException
IOException
public boolean readUpTo(ByteBuffer buffer, int size, int readCount) throws IOException
IOException
public void writeSizeAndIndex(ByteBuffer buffer, int action, long index) throws IOException
IOException
public void writeAction(ByteBuffer buffer, long action, long index) throws IOException
IOException
Copyright © 2017. All rights reserved.