Top Description Fields Constructors Methods
io.rsocket.core

pack-priv final Class StreamIdSupplier

extends Object
Class Inheritance
Imports
io.netty.util.collection.IntObjectMap

This API is not thread-safe and must be strictly used in serialized fashion

Field Summary

Modifier and TypeField and Description
private static final int
private long

Constructor Summary

AccessConstructor and Description
pack-priv
StreamIdSupplier(int streamId)

Method Summary

Modifier and TypeMethod and Description
pack-priv static StreamIdSupplier
pack-priv boolean
isBeforeOrCurrent(int streamId)

pack-priv int

Returns:

next stream id
nextStreamId
(IntObjectMap<?>
currently running streams store
streamIds
)

This methods provides new stream id and ensures there is no intersections with already running streams.

pack-priv static StreamIdSupplier
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

MASKback to summary
private static final int MASK
streamIdback to summary
private long streamId

Constructor Detail

StreamIdSupplierback to summary
pack-priv StreamIdSupplier(int streamId)

Method Detail

clientSupplierback to summary
pack-priv static StreamIdSupplier clientSupplier()
isBeforeOrCurrentback to summary
pack-priv boolean isBeforeOrCurrent(int streamId)
nextStreamIdback to summary
pack-priv int nextStreamId(IntObjectMap<?> streamIds)

This methods provides new stream id and ensures there is no intersections with already running streams. This methods is not thread-safe.

Parameters
streamIds:IntObjectMap<?>

currently running streams store

Returns:int

next stream id

serverSupplierback to summary
pack-priv static StreamIdSupplier serverSupplier()