Class ProtonLinkCreditState
- java.lang.Object
-
- org.apache.qpid.protonj2.engine.impl.ProtonLinkCreditState
-
- All Implemented Interfaces:
LinkCreditState
public class ProtonLinkCreditState extends Object implements LinkCreditState
Holds the current credit state for a given link.
-
-
Constructor Summary
Constructors Constructor Description ProtonLinkCreditState()
ProtonLinkCreditState(int deliveryCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCredit()
The currently available credit for this linkint
getDeliveryCount()
The current delivery count value for this linkboolean
isDrain()
boolean
isEcho()
void
updateCredit(int effectiveCredit)
void
updateDeliveryCount(int deliveryCount)
-
-
-
Method Detail
-
getCredit
public int getCredit()
Description copied from interface:LinkCreditState
The currently available credit for this link- Specified by:
getCredit
in interfaceLinkCreditState
- Returns:
- the current amount of link credit
-
getDeliveryCount
public int getDeliveryCount()
Description copied from interface:LinkCreditState
The current delivery count value for this link- Specified by:
getDeliveryCount
in interfaceLinkCreditState
- Returns:
- the current delivery count value for the link.
-
isDrain
public boolean isDrain()
- Specified by:
isDrain
in interfaceLinkCreditState
- Returns:
- true if the link drain is active.
-
isEcho
public boolean isEcho()
- Specified by:
isEcho
in interfaceLinkCreditState
- Returns:
- true if the link has been requested to echo its state.
-
updateCredit
public void updateCredit(int effectiveCredit)
-
updateDeliveryCount
public void updateDeliveryCount(int deliveryCount)
-
-