Package one.microstream.com.binary
Class ComBinary
- java.lang.Object
-
- one.microstream.com.binary.ComBinary
-
public class ComBinary extends Object
-
-
Constructor Summary
Constructors Constructor Description ComBinary()
-
Method Summary
-
-
-
Method Detail
-
chunkHeaderLength
public static int chunkHeaderLength()
The length of the fixed-size chunk header.So far, the header only consists of one field holding the length of the chunk content. See
Binary.lengthLength(). In the future, the header might contain validation values like protocol name, version, byte order, etc.
Maybe, the consequence will be a dynamically sized header, meaning there- Returns:
- The length of the fixed-size chunk header.
-
getChunkHeaderContentLength
public static long getChunkHeaderContentLength(ByteBuffer directByteBuffer, boolean switchedByteOrder)
-
setChunkHeaderContentLength
public static ByteBuffer setChunkHeaderContentLength(ByteBuffer directByteBuffer, long contentLength, boolean switchedByteOrder)
-
operationTimeout
public static int operationTimeout()
-
readChunk
public static ByteBuffer readChunk(SocketChannel channel, ByteBuffer defaultBuffer, boolean switchedByteOrder) throws ComException, ComExceptionTimeout
- Throws:
ComExceptionComExceptionTimeout
-
writeChunk
public static void writeChunk(SocketChannel channel, ByteBuffer headerBuffer, ByteBuffer[] buffers) throws ComException, ComExceptionTimeout
- Throws:
ComExceptionComExceptionTimeout
-
DefaultPersistenceAdaptorCreator
public static ComPersistenceAdaptorBinary.Creator.Default DefaultPersistenceAdaptorCreator()
-
Foundation
public static ComFoundation.Default<?> Foundation()
-
Host
public static final ComHost<SocketChannel> Host()
-
Host
public static final ComHost<SocketChannel> Host(int localHostPort)
-
Host
public static final ComHost<SocketChannel> Host(InetSocketAddress targetAddress)
-
Host
public static final ComHost<SocketChannel> Host(ComHostChannelAcceptor<SocketChannel> channelAcceptor)
-
Host
public static final ComHost<SocketChannel> Host(int localHostPort, ComHostChannelAcceptor<SocketChannel> channelAcceptor)
-
Host
public static final ComHost<SocketChannel> Host(InetSocketAddress targetAddress, ComHostChannelAcceptor<SocketChannel> channelAcceptor)
-
runHost
public static final void runHost()
-
runHost
public static final void runHost(int localHostPort)
-
runHost
public static final void runHost(InetSocketAddress targetAddress)
-
runHost
public static final void runHost(ComHostChannelAcceptor<SocketChannel> channelAcceptor)
-
runHost
public static final void runHost(int localHostPort, ComHostChannelAcceptor<SocketChannel> channelAcceptor)
-
runHost
public static final void runHost(InetSocketAddress targetAddress, ComHostChannelAcceptor<SocketChannel> channelAcceptor)
-
Client
public static final ComClient<SocketChannel> Client()
-
Client
public static final ComClient<SocketChannel> Client(int localHostPort)
-
Client
public static final ComClient<SocketChannel> Client(InetSocketAddress targetAddress)
-
connect
public static final ComClientChannel<SocketChannel> connect()
-
connect
public static final ComClientChannel<SocketChannel> connect(int localHostPort)
-
connect
public static final ComClientChannel<SocketChannel> connect(InetSocketAddress targetAddress)
-
-