creditManager.clearCredit();
}
public void addCredit(MessageCreditUnit unit, long value)
{
FlowCreditManager_0_10 creditManager = getCreditManager();
switch (unit)
{
case MESSAGE:
creditManager.addCredit(value, 0L);
break;
case BYTE:
creditManager.addCredit(0l, value);
break;
}
_stopped.set(false);
if(creditManager.hasCredit())
{
if(_state.compareAndSet(State.SUSPENDED, State.ACTIVE))
{
_stateListener.stateChange(this, State.SUSPENDED, State.ACTIVE);
}