X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2Fquelaton%2FGetNodeCommandImpl.java;h=51ebd73615eb5a7bee15c1a32892c3805010c1a0;hb=33619cae4ed0a765a2f81f67e5923f4f427b177f;hp=3c260ab2a7e01d156685fc0b2967287e766d08ba;hpb=d558b6c8d41b6b25adf49eadda1dae32af2c5933;p=jFCPlib.git diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/GetNodeCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/GetNodeCommandImpl.java index 3c260ab..51ebd73 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/GetNodeCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/GetNodeCommandImpl.java @@ -22,6 +22,8 @@ public class GetNodeCommandImpl implements GetNodeCommand { private final ListeningExecutorService threadPool; private final ConnectionSupplier connectionSupplier; private final AtomicBoolean giveOpennetRef = new AtomicBoolean(false); + private final AtomicBoolean includePrivate = new AtomicBoolean(false); + private final AtomicBoolean includeVolatile = new AtomicBoolean(false); public GetNodeCommandImpl(ExecutorService threadPool, ConnectionSupplier connectionSupplier) { this.threadPool = MoreExecutors.listeningDecorator(threadPool); @@ -35,8 +37,21 @@ public class GetNodeCommandImpl implements GetNodeCommand { } @Override + public GetNodeCommand includePrivate() { + includePrivate.set(true); + return this; + } + + @Override + public GetNodeCommand includeVolatile() { + includeVolatile.set(true); + return this; + } + + @Override public ListenableFuture execute() { - GetNode getNode = new GetNode(new RandomIdentifierGenerator().generate(), giveOpennetRef.get(), false, false); + GetNode getNode = new GetNode(new RandomIdentifierGenerator().generate(), giveOpennetRef.get(), + includePrivate.get(), includeVolatile.get()); return threadPool.submit(() -> new GetNodeReplySequence().send(getNode).get()); }