public class LeakyBucket
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long |
nextTxTime |
private long |
rate
Rate in bytes/sec.
|
Constructor and Description |
---|
LeakyBucket(long rate) |
Modifier and Type | Method and Description |
---|---|
void |
list(java.io.PrintStream out)
Prints this HTTP Request Reader fields out to the
specified output stream.
|
java.lang.String |
toString() |
int |
waitTxAccess(int length) |
int |
waitTxAccess(int length,
boolean block) |
public int waitTxAccess(int length)
public int waitTxAccess(int length, boolean block)
numTokens
- public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)