public class Reservation extends Object
| Constructor and Description |
|---|
Reservation(io.netty.channel.EventLoopGroup workerGroup,
ChannelClientConfiguration channelClientConfiguration)
Creates a new reservation class with the 3 permits.
|
| Modifier and Type | Method and Description |
|---|---|
FutureChannelCreator |
create(int permitsUDP,
int permitsTCP)
Create a connection creator for short-lived connections.
|
FutureChannelCreator |
create(RoutingConfiguration routingConfiguration,
RequestP2PConfiguration requestP2PConfiguration,
DefaultConnectionConfiguration builder)
This will calculate the number of required connection for routing and
request messages.
|
FutureChannelCreator |
createPermanent(int permitsPermanentTCP)
Create a connection creator for permanent connections.
|
int |
pendingRequests() |
FutureDone<Void> |
shutdown()
Shutdown all the channel creators out there.
|
FutureDone<Void> |
shutdownFuture() |
public Reservation(io.netty.channel.EventLoopGroup workerGroup,
ChannelClientConfiguration channelClientConfiguration)
workerGroup - The worker group for both UDP and TCP channels. This will not
be shutdown in this class, you need to shutdown it outside.channelClientConfiguration - Sets maxPermitsUDP: the number of maximum short-lived UDP
connections, maxPermitsTCP: the number of maximum short-lived
TCP connections, maxPermitsPermanentTCP: the number of maximum
permanent TCP connectionspublic int pendingRequests()
public FutureChannelCreator create(RoutingConfiguration routingConfiguration, RequestP2PConfiguration requestP2PConfiguration, DefaultConnectionConfiguration builder)
routingConfiguration - Contains the number of routing requests in parallelrequestP2PConfiguration - Contains the number of requests for P2P operations in parallelbuilder - The builder that tells us if we should use TCP or UPDpublic FutureChannelCreator create(int permitsUDP, int permitsTCP)
permitsUDP - The number of short-lived UDP connectionspermitsTCP - The number of short-lived TCP connectionspublic FutureChannelCreator createPermanent(int permitsPermanentTCP)
permitsPermanentTCP - The number of long-lived TCP connectionspublic FutureDone<Void> shutdown()
public FutureDone<Void> shutdownFuture()
shutdown()Copyright © 2014. All rights reserved.