Package herddb.network.netty
Class NettyChannel
- java.lang.Object
-
- herddb.network.Channel
-
- herddb.network.netty.AbstractChannel
-
- herddb.network.netty.NettyChannel
-
- All Implemented Interfaces:
AutoCloseable
public class NettyChannel extends AbstractChannel
Channel implemented on Netty- Author:
- enrico.olivelli
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class herddb.network.Channel
Channel.PduCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected AtomicIntegerunflushedWrites-
Fields inherited from class herddb.network.netty.AbstractChannel
ADDRESS_JVM_LOCAL, ioErrors
-
Fields inherited from class herddb.network.Channel
messagesReceiver
-
-
Constructor Summary
Constructors Constructor Description NettyChannel(String name, io.netty.channel.Channel socket, ExecutorService callbackexecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringdescribeSocket()voiddoClose()io.netty.channel.ChannelgetSocket()booleanisLocalChannel()booleanisValid()voidsendOneWayMessage(io.netty.buffer.ByteBuf message, SendResultCallback callback)StringtoString()-
Methods inherited from class herddb.network.netty.AbstractChannel
channelIdle, close, directProcessPdu, getId, getRemoteAddress, isClosed, pduReceived, pendingCallbacks, sendReplyMessage, sendRequestWithAsyncReply
-
Methods inherited from class herddb.network.Channel
generateRequestId, getMessagesReceiver, getName, sendMessageWithPduReply, setMessagesReceiver
-
-
-
-
Field Detail
-
unflushedWrites
protected final AtomicInteger unflushedWrites
-
-
Constructor Detail
-
NettyChannel
public NettyChannel(String name, io.netty.channel.Channel socket, ExecutorService callbackexecutor)
-
-
Method Detail
-
sendOneWayMessage
public void sendOneWayMessage(io.netty.buffer.ByteBuf message, SendResultCallback callback)- Specified by:
sendOneWayMessagein classChannel
-
isLocalChannel
public boolean isLocalChannel()
- Specified by:
isLocalChannelin classChannel
-
doClose
public void doClose()
- Specified by:
doClosein classAbstractChannel
-
getSocket
public io.netty.channel.Channel getSocket()
-
describeSocket
protected String describeSocket()
- Specified by:
describeSocketin classAbstractChannel
-
-