Update Client.java

Added ability to customize refCount value of a client
This commit is contained in:
BartolomeoDR 2021-10-16 14:27:48 +03:00 committed by GitHub
parent 34e5b9027e
commit d1bc03664b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,9 +36,14 @@ public class Client {
public Map<String, String> serializableProperties; public Map<String, String> serializableProperties;
public transient AtomicInteger refCount = new AtomicInteger(1); public transient AtomicInteger refCount;
public Client(UUID session) { public Client(UUID session) {
this(session, 1);
}
public Client(UUID session, int initialRefCount) {
refCount = new AtomicInteger(initialRefCount);
this.session = session; this.session = session;
timestamp = System.currentTimeMillis(); timestamp = System.currentTimeMillis();
type = null; type = null;