@Override public synchronized void reset() { // Any pendingCredits credits from before failover won't arrive, so we re-initialise int beforeFailure = pendingCredits; pendingCredits = 0; arriving = 0; // If we are waiting for more credits than what's configured, then we need to use what we tried before // otherwise the client may starve as the credit will never arrive checkCredits(Math.max(windowSize * 2, beforeFailure)); }
@Override public void init(SessionContext sessionContext) { // We initial request twice as many credits as we request in subsequent requests // This allows the producer to keep sending as more arrive, minimising pauses checkCredits(windowSize); this.sessionContext = sessionContext; this.sessionContext.linkFlowControl(address, this); }
@Override public void acquireCredits(final int credits) throws ActiveMQException { checkCredits(credits); actualAcquire(credits); afterAcquired(credits); }
@Override public synchronized void reset() { // Any pendingCredits credits from before failover won't arrive, so we re-initialise int beforeFailure = pendingCredits; pendingCredits = 0; arriving = 0; // If we are waiting for more credits than what's configured, then we need to use what we tried before // otherwise the client may starve as the credit will never arrive checkCredits(Math.max(windowSize * 2, beforeFailure)); }
@Override public synchronized void reset() { // Any pendingCredits credits from before failover won't arrive, so we re-initialise int beforeFailure = pendingCredits; pendingCredits = 0; arriving = 0; // If we are waiting for more credits than what's configured, then we need to use what we tried before // otherwise the client may starve as the credit will never arrive checkCredits(Math.max(windowSize * 2, beforeFailure)); }
@Override public synchronized void reset() { // Any pendingCredits credits from before failover won't arrive, so we re-initialise int beforeFailure = pendingCredits; pendingCredits = 0; arriving = 0; // If we are waiting for more credits than what's configured, then we need to use what we tried before // otherwise the client may starve as the credit will never arrive checkCredits(Math.max(windowSize * 2, beforeFailure)); }
@Override public synchronized void reset() { // Any pendingCredits credits from before failover won't arrive, so we re-initialise int beforeFailure = pendingCredits; pendingCredits = 0; arriving = 0; // If we are waiting for more credits than what's configured, then we need to use what we tried before // otherwise the client may starve as the credit will never arrive checkCredits(Math.max(windowSize * 2, beforeFailure)); }
@Override public synchronized void reset() { // Any pendingCredits credits from before failover won't arrive, so we re-initialise int beforeFailure = pendingCredits; pendingCredits = 0; arriving = 0; // If we are waiting for more credits than what's configured, then we need to use what we tried before // otherwise the client may starve as the credit will never arrive checkCredits(Math.max(windowSize * 2, beforeFailure)); }
@Override public synchronized void reset() { // Any pendingCredits credits from before failover won't arrive, so we re-initialise int beforeFailure = pendingCredits; pendingCredits = 0; arriving = 0; // If we are waiting for more credits than what's configured, then we need to use what we tried before // otherwise the client may starve as the credit will never arrive checkCredits(Math.max(windowSize * 2, beforeFailure)); }
@Override public void init(SessionContext sessionContext) { // We initial request twice as many credits as we request in subsequent requests // This allows the producer to keep sending as more arrive, minimising pauses checkCredits(windowSize); this.sessionContext = sessionContext; this.sessionContext.linkFlowControl(address, this); }
@Override public void init(SessionContext sessionContext) { // We initial request twice as many credits as we request in subsequent requests // This allows the producer to keep sending as more arrive, minimising pauses checkCredits(windowSize); this.sessionContext = sessionContext; this.sessionContext.linkFlowControl(address, this); }
@Override public void init(SessionContext sessionContext) { // We initial request twice as many credits as we request in subsequent requests // This allows the producer to keep sending as more arrive, minimising pauses checkCredits(windowSize); this.sessionContext = sessionContext; this.sessionContext.linkFlowControl(address, this); }
@Override public void init(SessionContext sessionContext) { // We initial request twice as many credits as we request in subsequent requests // This allows the producer to keep sending as more arrive, minimising pauses checkCredits(windowSize); this.sessionContext = sessionContext; this.sessionContext.linkFlowControl(address, this); }
@Override public void init(SessionContext sessionContext) { // We initial request twice as many credits as we request in subsequent requests // This allows the producer to keep sending as more arrive, minimising pauses checkCredits(windowSize); this.sessionContext = sessionContext; this.sessionContext.linkFlowControl(address, this); }
@Override public void acquireCredits(final int credits) throws ActiveMQException { checkCredits(credits); actualAcquire(credits); afterAcquired(credits); }
@Override public void acquireCredits(final int credits) throws ActiveMQException { checkCredits(credits); actualAcquire(credits); afterAcquired(credits); }
@Override public void acquireCredits(final int credits) throws ActiveMQException { checkCredits(credits); actualAcquire(credits); afterAcquired(credits); }
@Override public void acquireCredits(final int credits) throws ActiveMQException { checkCredits(credits); actualAcquire(credits); afterAcquired(credits); }
@Override public void acquireCredits(final int credits) throws ActiveMQException { checkCredits(credits); actualAcquire(credits); afterAcquired(credits); }
@Override public void acquireCredits(final int credits) throws ActiveMQException { checkCredits(credits); actualAcquire(credits); afterAcquired(credits); }