Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SravanThotakura05 committed Jan 1, 2024
1 parent 02f0bac commit 3b52eea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.solace.incoming;

import io.quarkiverse.solace.i18n.SolaceLogging;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import io.quarkiverse.solace.i18n.SolaceLogging;

class IncomingMessagesUnsignedCounterBarrier {
private final AtomicLong counter; // Treated as an unsigned long (i.e. range from 0 -> -1)
private final Lock awaitLock = new ReentrantLock();
Expand Down Expand Up @@ -61,7 +61,8 @@ public boolean awaitEmpty(long timeout, TimeUnit unit) throws InterruptedExcepti
awaitLock.lock();
try {
if (timeout > 0) {
SolaceLogging.log.info(String.format("Waiting for %s items, time remaining: %s %s", counter.get(), timeout, unit));
SolaceLogging.log
.info(String.format("Waiting for %s items, time remaining: %s %s", counter.get(), timeout, unit));
final long expiry = unit.toMillis(timeout) + System.currentTimeMillis();
while (isGreaterThanZero()) {
long realTimeout = expiry - System.currentTimeMillis();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.solace.outgoing;

import io.quarkiverse.solace.i18n.SolaceLogging;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import io.quarkiverse.solace.i18n.SolaceLogging;

class OutgoingMessagesUnsignedCounterBarrier {
private final AtomicLong counter; // Treated as an unsigned long (i.e. range from 0 -> -1)
private final Lock awaitLock = new ReentrantLock();
Expand Down Expand Up @@ -61,7 +61,8 @@ public boolean awaitEmpty(long timeout, TimeUnit unit) throws InterruptedExcepti
awaitLock.lock();
try {
if (timeout > 0) {
SolaceLogging.log.info(String.format("Waiting for %s items, time remaining: %s %s", counter.get(), timeout, unit));
SolaceLogging.log
.info(String.format("Waiting for %s items, time remaining: %s %s", counter.get(), timeout, unit));
final long expiry = unit.toMillis(timeout) + System.currentTimeMillis();
while (isGreaterThanZero()) {
long realTimeout = expiry - System.currentTimeMillis();
Expand Down

0 comments on commit 3b52eea

Please sign in to comment.