public class WindowCreditManager extends AbstractFlowCreditManager implements FlowCreditManager_0_10
FlowCreditManager.FlowCreditManagerListener
Constructor and Description |
---|
WindowCreditManager(long bytesCreditLimit,
long messageCreditLimit,
ProtocolEngine protocolEngine) |
Modifier and Type | Method and Description |
---|---|
void |
addCredit(long count,
long bytes) |
void |
clearCredit() |
long |
getBytesCredit() |
long |
getMessageCredit() |
long |
getMessageCreditLimit() |
boolean |
hasCredit() |
void |
restoreCredit(long messageCredit,
long bytesCredit) |
boolean |
useCreditForMessage(long msgSize) |
addStateListener, notifyIncreaseBytesCredit, removeListener, setSuspended
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addStateListener, removeListener
public WindowCreditManager(long bytesCreditLimit, long messageCreditLimit, ProtocolEngine protocolEngine)
public long getMessageCreditLimit()
public long getMessageCredit()
public long getBytesCredit()
public void restoreCredit(long messageCredit, long bytesCredit)
restoreCredit
in interface FlowCreditManager
public boolean hasCredit()
hasCredit
in interface FlowCreditManager
public boolean useCreditForMessage(long msgSize)
useCreditForMessage
in interface FlowCreditManager
public void addCredit(long count, long bytes)
addCredit
in interface FlowCreditManager_0_10
public void clearCredit()
clearCredit
in interface FlowCreditManager_0_10
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.