You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2023/11/02 18:47:53 UTC
(commons-jcs) 01/07: JCS-240: Fix "Method not remote" exception
This is an automated email from the ASF dual-hosted git repository.
tv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jcs.git
commit b462d2fb341840e772542a06debccbe8786a9fe2
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Thu Nov 2 19:21:53 2023 +0100
JCS-240: Fix "Method not remote" exception
---
.../remote/behavior/IRemoteCacheListener.java | 56 +++++++++++++++++++---
1 file changed, 50 insertions(+), 6 deletions(-)
diff --git a/commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/behavior/IRemoteCacheListener.java b/commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/behavior/IRemoteCacheListener.java
index bac58de2..37055d1b 100644
--- a/commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/behavior/IRemoteCacheListener.java
+++ b/commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/behavior/IRemoteCacheListener.java
@@ -23,35 +23,79 @@ import java.io.IOException;
import java.rmi.Remote;
import org.apache.commons.jcs3.auxiliary.remote.server.behavior.RemoteType;
+import org.apache.commons.jcs3.engine.behavior.ICacheElement;
import org.apache.commons.jcs3.engine.behavior.ICacheListener;
/**
* Listens for remote cache event notification ( rmi callback ).
+ * The methods of the base interface are re-declared here because of a fix
+ * in Java 8u241 and above. See https://bugs.openjdk.org/browse/JDK-8237213
+ * for an explanation.
*/
public interface IRemoteCacheListener<K, V>
extends ICacheListener<K, V>, Remote
{
/**
- * Get the id to be used by this manager.
+ * Notifies the subscribers for a cache entry update.
* <p>
- * @return long
+ * @param item
* @throws IOException
*/
@Override
- long getListenerId()
+ void handlePut( ICacheElement<K, V> item )
+ throws IOException;
+
+ /**
+ * Notifies the subscribers for a cache entry removal.
+ * <p>
+ * @param cacheName
+ * @param key
+ * @throws IOException
+ */
+ @Override
+ void handleRemove( String cacheName, K key )
+ throws IOException;
+
+ /**
+ * Notifies the subscribers for a cache remove-all.
+ * <p>
+ * @param cacheName
+ * @throws IOException
+ */
+ @Override
+ void handleRemoveAll( String cacheName )
throws IOException;
/**
- * Set the id to be used by this manager. The remote cache server identifies clients by this id.
- * The value will be set by the server through the remote cache listener.
+ * Notifies the subscribers for freeing up the named cache.
* <p>
- * @param id
+ * @param cacheName
+ * @throws IOException
+ */
+ @Override
+ void handleDispose( String cacheName )
+ throws IOException;
+
+ /**
+ * sets unique identifier of listener home
+ * <p>
+ * @param id The new listenerId value
* @throws IOException
*/
@Override
void setListenerId( long id )
throws IOException;
+ /**
+ * Gets the listenerId attribute of the ICacheListener object
+ * <p>
+ * @return The listenerId value
+ * @throws IOException
+ */
+ @Override
+ long getListenerId()
+ throws IOException;
+
/**
* Gets the remoteType attribute of the IRemoteCacheListener object
* <p>