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
IOExceptionpublic boolean open(boolean blocking)
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic abstract boolean isLocalhost()
protected abstract SocketChannel openSocketChannel() throws IOException
IOExceptionprotected void setSocketChannel(SocketChannel socketChannel) throws IOException
IOExceptionpublic SocketChannel socketChannel()
public boolean isOpen()
public String debugString()
public int write(ByteBuffer buffer) throws IOException
IOExceptionpublic void writeAllOrEOF(net.openhft.lang.io.DirectByteBufferBytes bb)
throws IOException
IOExceptionpublic void writeAllOrEOF(ByteBuffer bb) throws IOException
IOExceptionpublic void writeAll(net.openhft.lang.io.DirectByteBufferBytes bb)
throws IOException
IOExceptionpublic void writeAll(ByteBuffer bb) throws IOException
IOExceptionpublic int read(ByteBuffer buffer) throws IOException
IOExceptionpublic boolean read(ByteBuffer buffer, int size) throws IOException
IOExceptionpublic boolean read(ByteBuffer buffer, int threshod, int size) throws IOException
IOExceptionpublic boolean read(ByteBuffer buffer, int threshod, int size, int readCount) throws IOException
IOExceptionpublic boolean readAtLeast(ByteBuffer buffer, int size, int readCount) throws IOException
IOExceptionpublic boolean readAllOrNone(ByteBuffer buffer, int readCount) throws IOException
IOExceptionpublic void readFullyOrEOF(@NotNull
ByteBuffer bb)
throws IOException
IOExceptionpublic void readAvailable(@NotNull
ByteBuffer bb)
throws IOException
IOExceptionpublic boolean readUpTo(ByteBuffer buffer, int size, int readCount) throws IOException
IOExceptionpublic void writeSizeAndIndex(ByteBuffer buffer, int action, long index) throws IOException
IOExceptionpublic void writeAction(ByteBuffer buffer, long action, long index) throws IOException
IOExceptionCopyright © 2021. All rights reserved.