From d24cf7427558437ac612284fc600f717466cdc15 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 22 Nov 2024 23:54:19 +0100 Subject: [PATCH] =?utf8?q?=E2=99=BB=EF=B8=8F=20Rename=20flag=20for=20inclu?= =?utf8?q?ding=20global=20requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../net/pterodactylus/fcp/highlevel/FcpClient.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/net/pterodactylus/fcp/highlevel/FcpClient.java b/src/main/java/net/pterodactylus/fcp/highlevel/FcpClient.java index 7450a35..c25f5b7 100644 --- a/src/main/java/net/pterodactylus/fcp/highlevel/FcpClient.java +++ b/src/main/java/net/pterodactylus/fcp/highlevel/FcpClient.java @@ -906,8 +906,8 @@ public class FcpClient implements Closeable { /** * Returns all currently visible persistent get requests. * - * @param global - * true to return get requests from the global + * @param includeGlobalRequests + * true to also return get requests from the global * queue, false to only show requests from the * client-local queue * @return All get requests @@ -916,15 +916,15 @@ public class FcpClient implements Closeable { * @throws FcpException * if an FCP error occurs */ - public Collection getGetRequests(final boolean global) throws IOException, FcpException { - return getRequests(global).stream().filter(request -> request instanceof GetRequest).collect(toList()); + public Collection getGetRequests(boolean includeGlobalRequests) throws IOException, FcpException { + return getRequests(includeGlobalRequests).stream().filter(request -> request instanceof GetRequest).collect(toList()); } /** * Returns all currently visible persistent put requests. * - * @param global - * true to return put requests from the global + * @param includeGlobalRequests + * true to also return put requests from the global * queue, false to only show requests from the * client-local queue * @return All put requests @@ -933,15 +933,15 @@ public class FcpClient implements Closeable { * @throws FcpException * if an FCP error occurs */ - public Collection getPutRequests(final boolean global) throws IOException, FcpException { - return getRequests(global).stream().filter(request -> request instanceof PutRequest).collect(toList()); + public Collection getPutRequests(boolean includeGlobalRequests) throws IOException, FcpException { + return getRequests(includeGlobalRequests).stream().filter(request -> request instanceof PutRequest).collect(toList()); } /** * Returns all currently visible persistent requests. * - * @param global - * true to return requests from the global queue, + * @param includeGlobalRequests + * true to also return requests from the global queue, * false to only show requests from the * client-local queue * @return All requests @@ -950,7 +950,7 @@ public class FcpClient implements Closeable { * @throws FcpException * if an FCP error occurs */ - public Collection getRequests(final boolean global) throws IOException, FcpException { + public Collection getRequests(boolean includeGlobalRequests) throws IOException, FcpException { final Map requests = Collections.synchronizedMap(new HashMap()); new ExtendedFcpAdapter() { @@ -968,7 +968,7 @@ public class FcpClient implements Closeable { */ @Override public void receivedPersistentGet(FcpConnection fcpConnection, PersistentGet persistentGet) { - if (!persistentGet.isGlobal() || global) { + if (!persistentGet.isGlobal() || includeGlobalRequests) { GetRequest getRequest = new GetRequest(persistentGet); requests.put(persistentGet.getIdentifier(), getRequest); } @@ -1017,7 +1017,7 @@ public class FcpClient implements Closeable { */ @Override public void receivedPersistentPut(FcpConnection fcpConnection, PersistentPut persistentPut) { - if (!persistentPut.isGlobal() || global) { + if (!persistentPut.isGlobal() || includeGlobalRequests) { PutRequest putRequest = new PutRequest(persistentPut); requests.put(persistentPut.getIdentifier(), putRequest); } -- 2.7.4