[#EHC-162] Distributed cache - flushing replicationQueue on dispose

advertisement
[EHC-162] Distributed cache - flushing replicationQueue on dispose Created:
21/Sep/09 Updated: 22/Sep/09 Resolved: 22/Sep/09
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Closed
Ehcache Core
None
None
Type:
Reporter:
Resolution:
Labels:
Remaining
Estimate:
Time Spent:
Original
Estimate:
Bug
Sourceforge Tracker
Fixed
None
Not Specified
Ehcache
Priority:
Ehcache
Resolution:
5
None
Assignee:
Votes:
Issue Review Board
0
Not Specified
Not Specified
Fixed
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
Comment by Sourceforge Tracker [ 21/Sep/09 ]
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
Comment by Fiona OShea [ 22/Sep/09 ]
Re-opening so that I can properly close out these issues and have correct Resolution status in
Jira
Generated at Tue Feb 09 15:19:08 PST 2016 using JIRA 6.2.4#6261sha1:4d2e6f6f26064845673c8e7ffe9b6b84b45a6e79.
Download