Skip to content

Commit

Permalink
Removed unnecessary flush based sync
Browse files Browse the repository at this point in the history
  • Loading branch information
maniksurtani committed Apr 27, 2009
1 parent 59ee8f6 commit bcb2012
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -20,14 +20,14 @@
* @since 4.0
*/
@ThreadSafe
public class FlushBasedDistributedSync implements DistributedSync {
public class JGroupsDistSync implements DistributedSync {

private final ReentrantReadWriteLock processingLock = new ReentrantReadWriteLock();
private final ReclosableLatch flushBlockGate = new ReclosableLatch();
private final ReclosableLatch flushBlockGate = new ReclosableLatch(true);
private final AtomicInteger flushBlockGateCount = new AtomicInteger(0);
private final AtomicInteger flushWaitGateCount = new AtomicInteger(0);
private final ReclosableLatch flushWaitGate = new ReclosableLatch(false);
private static final Log log = LogFactory.getLog(FlushBasedDistributedSync.class);
private static final Log log = LogFactory.getLog(JGroupsDistSync.class);

public SyncResponse blockUntilAcquired(long timeout, TimeUnit timeUnit) throws TimeoutException {
int initState = flushWaitGateCount.get();
Expand Down
Expand Up @@ -74,7 +74,7 @@ public class JGroupsTransport implements Transport, ExtendedMembershipListener,
ExecutorService asyncExecutor;
CacheManagerNotifier notifier;
final ConcurrentMap<String, StateTransferMonitor> stateTransfersInProgress = new ConcurrentHashMap<String, StateTransferMonitor>();
private final FlushBasedDistributedSync flushTracker = new FlushBasedDistributedSync();
private final JGroupsDistSync flushTracker = new JGroupsDistSync();
long distributedSyncTimeout;

// ------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -401,11 +401,11 @@ public void suspect(org.jgroups.Address suspected_mbr) {
}

public void block() {
flushTracker.acquireSync();
// no-op
}

public void unblock() {
flushTracker.releaseSync();
// no-op
}

public void receive(Message msg) {
Expand Down

0 comments on commit bcb2012

Please sign in to comment.