Uses of Package
net.tomp2p.utils

Packages that use net.tomp2p.utils
net.tomp2p.connection   
net.tomp2p.utils   
 

Classes in net.tomp2p.utils used by net.tomp2p.connection
GlobalTrafficShapingHandler
          This implementation of the AbstractTrafficShapingHandler is for global traffic shaping, that is to say a global limitation of the bandwidth, whatever the number of opened channels.

The general use should be as follow:
Create your unique GlobalTrafficShapingHandler like:

GlobalTrafficShapingHandler myHandler = new GlobalTrafficShapingHandler(executor);

executor could be created using Executors.newCachedThreadPool();
pipeline.addLast("GLOBAL_TRAFFIC_SHAPING", myHandler);

Note that this handler has a Pipeline Coverage of "all" which means only one such handler must be created and shared among all channels as the counter must be shared among all channels.

Other arguments can be passed like write or read limitation (in bytes/s where 0 means no limitation) or the check interval (in millisecond) that represents the delay between two computations of the bandwidth and so the call back of the doAccounting method (0 means no accounting at all).

A value of 0 means no accounting for checkInterval.
 

Classes in net.tomp2p.utils used by net.tomp2p.utils
AbstractTrafficShapingHandler
          AbstractTrafficShapingHandler allows to limit the global bandwidth (see GlobalTrafficShapingHandler) or per session bandwidth (see ChannelTrafficShapingHandler), as traffic shaping.
TrafficCounter
          TrafficCounter is associated with AbstractTrafficShapingHandler.

A TrafficCounter has for goal to count the traffic in order to enable to limit the traffic or not, globally or per channel.
 



Copyright © 2011. All Rights Reserved.