projects
/
jFCPlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add flag to GetNode command to include volatile data
[jFCPlib.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
fcp
/
quelaton
/
GetNodeCommandImpl.java
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
(file)
--- 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 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);
public GetNodeCommandImpl(ExecutorService threadPool, ConnectionSupplier connectionSupplier) {
this.threadPool = MoreExecutors.listeningDecorator(threadPool);
@@
-35,8
+37,21
@@
public class GetNodeCommandImpl implements GetNodeCommand {
}
@Override
}
@Override
+ public GetNodeCommand includePrivate() {
+ includePrivate.set(true);
+ return this;
+ }
+
+ @Override
+ public GetNodeCommand includeVolatile() {
+ includeVolatile.set(true);
+ return this;
+ }
+
+ @Override
public ListenableFuture<NodeData> execute() {
public ListenableFuture<NodeData> 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());
}
return threadPool.submit(() -> new GetNodeReplySequence().send(getNode).get());
}