Class FlowHandler
- java.lang.Object
-
- io.pravega.shared.protocol.netty.FailingReplyProcessor
-
- io.pravega.client.connection.impl.FlowHandler
-
- All Implemented Interfaces:
io.pravega.shared.protocol.netty.ReplyProcessor,java.lang.AutoCloseable
public class FlowHandler extends io.pravega.shared.protocol.netty.FailingReplyProcessor implements java.lang.AutoCloseable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidconnectionDropped()ClientConnectioncreateConnectionWithFlowDisabled(io.pravega.shared.protocol.netty.ReplyProcessor rp)Create aClientConnectionwhere flows are disabled.ClientConnectioncreateFlow(Flow flow, io.pravega.shared.protocol.netty.ReplyProcessor rp)Create a flow on existing connection.voiderrorMessage(io.pravega.shared.protocol.netty.WireCommands.ErrorMessage errorMessage)io.pravega.shared.metrics.MetricNotifiergetMetricNotifier()intgetOpenFlowCount()Returns the number of open flows.booleanisClosed()voidprocess(io.pravega.shared.protocol.netty.Reply cmd)voidprocessingFailure(java.lang.Exception error)-
Methods inherited from class io.pravega.shared.protocol.netty.FailingReplyProcessor
appendSetup, authTokenCheckFailed, conditionalCheckFailed, dataAppended, hello, invalidEventNumber, keepAlive, noSuchSegment, operationUnsupported, segmentAlreadyExists, segmentAttribute, segmentAttributeUpdated, segmentCreated, segmentDeleted, segmentIsSealed, segmentIsTruncated, segmentPolicyUpdated, segmentRead, segmentSealed, segmentsMerged, segmentTruncated, streamSegmentInfo, tableEntriesDeltaRead, tableEntriesRead, tableEntriesUpdated, tableKeyBadVersion, tableKeyDoesNotExist, tableKeysRead, tableKeysRemoved, tableRead, tableSegmentNotEmpty, wrongHost
-
-
-
-
Method Detail
-
createFlow
public ClientConnection createFlow(Flow flow, io.pravega.shared.protocol.netty.ReplyProcessor rp)
Create a flow on existing connection.- Parameters:
flow- Flow.rp- ReplyProcessor for the specified flow.- Returns:
- Client Connection object.
-
createConnectionWithFlowDisabled
public ClientConnection createConnectionWithFlowDisabled(io.pravega.shared.protocol.netty.ReplyProcessor rp)
Create aClientConnectionwhere flows are disabled. This implies that there is only one flow on the underlying network connection.- Parameters:
rp- The ReplyProcessor.- Returns:
- Client Connection object.
-
getOpenFlowCount
public int getOpenFlowCount()
Returns the number of open flows.- Returns:
- Flow count.
-
process
public void process(io.pravega.shared.protocol.netty.Reply cmd)
- Specified by:
processin interfaceio.pravega.shared.protocol.netty.ReplyProcessor
-
errorMessage
public void errorMessage(io.pravega.shared.protocol.netty.WireCommands.ErrorMessage errorMessage)
- Specified by:
errorMessagein interfaceio.pravega.shared.protocol.netty.ReplyProcessor- Overrides:
errorMessagein classio.pravega.shared.protocol.netty.FailingReplyProcessor
-
processingFailure
public void processingFailure(java.lang.Exception error)
- Specified by:
processingFailurein interfaceio.pravega.shared.protocol.netty.ReplyProcessor
-
connectionDropped
public void connectionDropped()
- Specified by:
connectionDroppedin interfaceio.pravega.shared.protocol.netty.ReplyProcessor
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
isClosed
public final boolean isClosed()
-
getMetricNotifier
public io.pravega.shared.metrics.MetricNotifier getMetricNotifier()
-
-