Class Flow
- java.lang.Object
-
- io.pravega.client.connection.impl.Flow
-
public class Flow extends java.lang.ObjectThe class represents a Flow between a Segment client and the SegmentStore. It consists of a flowId and a requestSequenceNumber. The flowId is used to represent the communication between Segment clients and the SegmentStore which uses an underlying connection pool. This flowId is unique per connection pool and a Flow is always tied to a specific network connection. The requestSequenceNumber is used to represent the requestSequence for a given Flow.
-
-
Constructor Summary
Constructors Constructor Description Flow(int flowId, int requestSequenceNumber)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longasLong()Return alongrepresentation ofFlow.protected booleancanEqual(java.lang.Object other)static Flowcreate()Create a new Flow.booleanequals(java.lang.Object o)static Flowfrom(long flowAsLong)Obtain a Flow from alongrepresentation.intgetFlowId()longgetNextSequenceNumber()Obtain alongrepresentation ofFlowwith the next sequence number.inthashCode()static inttoFlowID(long requestID)Obtain a FlowID from alongrepresentation.java.lang.StringtoString()
-
-
-
Method Detail
-
create
public static Flow create()
Create a new Flow.- Returns:
- Flow.
-
from
public static Flow from(long flowAsLong)
Obtain a Flow from alongrepresentation.- Parameters:
flowAsLong- alongrepresentation ofFlow.- Returns:
- Flow.
-
toFlowID
public static int toFlowID(long requestID)
Obtain a FlowID from alongrepresentation.- Parameters:
requestID- request identifier.- Returns:
- Flow ID.
-
asLong
public long asLong()
Return alongrepresentation ofFlow.- Returns:
- long representation.
-
getNextSequenceNumber
public long getNextSequenceNumber()
Obtain alongrepresentation ofFlowwith the next sequence number.- Returns:
longrepresentation ofFlowwith the next sequence number.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getFlowId
public int getFlowId()
-
-