io.contek.invoker.binanceinverse.api.websocket.WebSocketRequestIdGenerator Maven / Gradle / Ivy
The newest version!
package io.contek.invoker.binanceinverse.api.websocket;
import javax.annotation.concurrent.ThreadSafe;
import java.util.concurrent.atomic.AtomicInteger;
@ThreadSafe
public class WebSocketRequestIdGenerator {
private final AtomicInteger count = new AtomicInteger(0);
public int getNextRequestId() {
return count.incrementAndGet();
}
}