public class SlowLinkSimulator extends Object
Constructor and Description |
---|
SlowLinkSimulator(int delayBytes,
int delayTime)
construct
|
SlowLinkSimulator(SlowLinkSimulator that)
construct by copying delay bytes and time, but not current count of bytes
|
Modifier and Type | Method and Description |
---|---|
int |
getCurrentBytes()
get the current byte count
|
int |
getTotalBytes()
how many bytes have gone past?
|
void |
pump(int bytes)
log #of bytes pumped.
|
void |
setCurrentBytes(int currentBytes)
set the current byte count
|
public SlowLinkSimulator(int delayBytes, int delayTime)
delayBytes
- bytes per delay; set to 0 for no delaydelayTime
- delay time per delay in millisecondspublic SlowLinkSimulator(SlowLinkSimulator that)
that
- source of datapublic int getTotalBytes()
public void pump(int bytes)
bytes
- public int getCurrentBytes()
public void setCurrentBytes(int currentBytes)
currentBytes
- Copyright © 2019. All Rights Reserved.