From d1099e914fdb3200d68048c88f91055752aaf34c Mon Sep 17 00:00:00 2001 From: Shivansh Arora Date: Mon, 22 Jul 2024 12:48:53 +0530 Subject: [PATCH] Rename listener methods Signed-off-by: Shivansh Arora --- .../remote/AbstractRemoteWritableEntityManager.java | 8 ++++---- .../remote/RemoteClusterStateAttributesManager.java | 4 ++-- .../gateway/remote/RemoteGlobalMetadataManager.java | 4 ++-- .../gateway/remote/RemoteIndexMetadataManager.java | 4 ++-- .../remote/AbstractRemoteWritableEntityManagerTests.java | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/server/src/main/java/org/opensearch/common/remote/AbstractRemoteWritableEntityManager.java b/server/src/main/java/org/opensearch/common/remote/AbstractRemoteWritableEntityManager.java index a168b31272c2f..dc301635c4a80 100644 --- a/server/src/main/java/org/opensearch/common/remote/AbstractRemoteWritableEntityManager.java +++ b/server/src/main/java/org/opensearch/common/remote/AbstractRemoteWritableEntityManager.java @@ -47,7 +47,7 @@ protected RemoteWritableEntityStore getStore(AbstractRemoteWritableBlobEntity en * @param listener the listener to be notified when the write operation completes * @return an ActionListener for handling the write operation */ - protected abstract ActionListener getWriteActionListener( + protected abstract ActionListener getWrappedWriteListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener @@ -62,7 +62,7 @@ protected abstract ActionListener getWriteActionListener( * @param listener the listener to be notified when the read operation completes * @return an ActionListener for handling the read operation */ - protected abstract ActionListener getReadActionListener( + protected abstract ActionListener getWrappedReadListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener @@ -74,11 +74,11 @@ public void writeAsync( AbstractRemoteWritableBlobEntity entity, ActionListener listener ) { - getStore(entity).writeAsync(entity, getWriteActionListener(component, entity, listener)); + getStore(entity).writeAsync(entity, getWrappedWriteListener(component, entity, listener)); } @Override public void readAsync(String component, AbstractRemoteWritableBlobEntity entity, ActionListener listener) { - getStore(entity).readAsync(entity, getReadActionListener(component, entity, listener)); + getStore(entity).readAsync(entity, getWrappedReadListener(component, entity, listener)); } } diff --git a/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateAttributesManager.java b/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateAttributesManager.java index bcf7a404f850f..67ac8d2b9a810 100644 --- a/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateAttributesManager.java +++ b/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateAttributesManager.java @@ -78,7 +78,7 @@ public class RemoteClusterStateAttributesManager extends AbstractRemoteWritableE } @Override - protected ActionListener getWriteActionListener( + protected ActionListener getWrappedWriteListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener @@ -90,7 +90,7 @@ protected ActionListener getWriteActionListener( } @Override - protected ActionListener getReadActionListener( + protected ActionListener getWrappedReadListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener diff --git a/server/src/main/java/org/opensearch/gateway/remote/RemoteGlobalMetadataManager.java b/server/src/main/java/org/opensearch/gateway/remote/RemoteGlobalMetadataManager.java index cef54e64890f9..5a6f4b7e9f1f1 100644 --- a/server/src/main/java/org/opensearch/gateway/remote/RemoteGlobalMetadataManager.java +++ b/server/src/main/java/org/opensearch/gateway/remote/RemoteGlobalMetadataManager.java @@ -157,7 +157,7 @@ public class RemoteGlobalMetadataManager extends AbstractRemoteWritableEntityMan } @Override - protected ActionListener getWriteActionListener( + protected ActionListener getWrappedWriteListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener @@ -169,7 +169,7 @@ protected ActionListener getWriteActionListener( } @Override - protected ActionListener getReadActionListener( + protected ActionListener getWrappedReadListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener diff --git a/server/src/main/java/org/opensearch/gateway/remote/RemoteIndexMetadataManager.java b/server/src/main/java/org/opensearch/gateway/remote/RemoteIndexMetadataManager.java index 757f6a586926e..c30721c8f625c 100644 --- a/server/src/main/java/org/opensearch/gateway/remote/RemoteIndexMetadataManager.java +++ b/server/src/main/java/org/opensearch/gateway/remote/RemoteIndexMetadataManager.java @@ -104,7 +104,7 @@ private void setIndexMetadataUploadTimeout(TimeValue newIndexMetadataUploadTimeo } @Override - protected ActionListener getWriteActionListener( + protected ActionListener getWrappedWriteListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener @@ -116,7 +116,7 @@ protected ActionListener getWriteActionListener( } @Override - protected ActionListener getReadActionListener( + protected ActionListener getWrappedReadListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener diff --git a/server/src/test/java/org/opensearch/common/remote/AbstractRemoteWritableEntityManagerTests.java b/server/src/test/java/org/opensearch/common/remote/AbstractRemoteWritableEntityManagerTests.java index 01661aca02701..3d10bbf59f6ad 100644 --- a/server/src/test/java/org/opensearch/common/remote/AbstractRemoteWritableEntityManagerTests.java +++ b/server/src/test/java/org/opensearch/common/remote/AbstractRemoteWritableEntityManagerTests.java @@ -44,7 +44,7 @@ public void testGetStoreWithUnknownEntityType() { private static class ConcreteRemoteWritableEntityManager extends AbstractRemoteWritableEntityManager { @Override - protected ActionListener getWriteActionListener( + protected ActionListener getWrappedWriteListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener @@ -53,7 +53,7 @@ protected ActionListener getWriteActionListener( } @Override - protected ActionListener getReadActionListener( + protected ActionListener getWrappedReadListener( String component, AbstractRemoteWritableBlobEntity remoteEntity, ActionListener listener