• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

In the case of disposing, the underlying replicationQueue of an (async) distributed cache will be cleared. That means the remaining entries will be discarded. It would be desirable that (it is configurable that) the queue will be flushed to the peers.

Current code class RMIAsynchronousCacheReplicator { … public final void dispose() { status = Status.STATUS_SHUTDOWN; synchronized (replicationQueue) { replicationQueue.clear(); } } … }

Alternative approach??

class RMIAsynchronousCacheReplicator { … public final void dispose() { status = Status.STATUS_SHUTDOWN; if (flushOnDispose) { flushReplicationQueue(); } else { synchronized (replicationQueue) { replicationQueue.clear(); } } } … } Sourceforge Ticket ID: 1684223 - Opened By: nobody - 20 Mar 2007 10:01 UTC

Comments

Sourceforge Tracker 2009-09-21

Logged In: YES user_id=693320 Originator: NO

Hi

This is an oversight in the implementation.

I think

/** * Give the replicator a chance to flush the replication queue, then cleanup and free resources when no longer needed */ public final void dispose() { status = Status.STATUS_SHUTDOWN; flushReplicationQueue(); }

does the job. I am not sure why we would want to make this a configuration option. There should be an expectation that it might take a distributed cache a few seconds to shut down.

Greg Comment by: gregluck - 25 Apr 2007 06:51 UTC

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira