MockCommitProcessor() { super(new RequestProcessor() { public void processRequest(Request request) throws RequestProcessorException { processedRequests.offer(request); } public void shutdown() { } }, "0", false, new ZooKeeperServerListener() { @Override public void notifyStopping(String threadName, int errorCode) { Assert.fail("Commit processor crashed " + errorCode); } }); }
MockCommitProcessor() { super( new RequestProcessor() { public void processRequest(Request request) throws RequestProcessorException { executedFlag = true; } public void shutdown(){} }, "0", false, new ZooKeeperServerListener(){ @Override public void notifyStopping(String errMsg, int exitCode) { }}); }
public LearnerSessionTracker(SessionExpirer expirer, ConcurrentHashMap<Long, Integer> sessionsWithTimeouts, long id, ZooKeeperServerListener listener) { this.expirer = expirer; this.sessionsWithTimeouts = sessionsWithTimeouts; this.serverId = id; nextSessionId = SessionTrackerImpl.initializeNextSession(this.serverId); }
public LearnerSessionTracker(SessionExpirer expirer, ConcurrentMap<Long, Integer> sessionsWithTimeouts, int tickTime, long id, boolean localSessionsEnabled, ZooKeeperServerListener listener) { this.expirer = expirer; this.touchTable.set(new ConcurrentHashMap<Long, Integer>()); this.globalSessionsWithTimeouts = sessionsWithTimeouts; this.serverId = id; nextSessionId.set(SessionTrackerImpl.initializeNextSession(serverId)); this.localSessionsEnabled = localSessionsEnabled; if (this.localSessionsEnabled) { createLocalSessionTracker(expirer, tickTime, id, listener); } }
public void createLocalSessionTracker(SessionExpirer expirer, int tickTime, long id, ZooKeeperServerListener listener) { this.localSessionsWithTimeouts = new ConcurrentHashMap<Long, Integer>(); this.localSessionTracker = new LocalSessionTracker( expirer, this.localSessionsWithTimeouts, tickTime, id, listener); }
public LeaderSessionTracker(SessionExpirer expirer, ConcurrentMap<Long, Integer> sessionsWithTimeouts, int tickTime, long id, boolean localSessionsEnabled, ZooKeeperServerListener listener) { this.globalSessionTracker = new SessionTrackerImpl( expirer, sessionsWithTimeouts, tickTime, id, listener); this.localSessionsEnabled = localSessionsEnabled; if (this.localSessionsEnabled) { createLocalSessionTracker(expirer, tickTime, id, listener); } serverId = id; }
ZooKeeperServerListener testZKSListener() { return new ZooKeeperServerListener() { @Override public void notifyStopping(String errMsg, int exitCode) { } }; }
public CommitProcessor(RequestProcessor nextProcessor, String id, boolean matchSyncs, ZooKeeperServerListener listener) { super("CommitProcessor:" + id, listener); this.nextProcessor = nextProcessor; this.matchSyncs = matchSyncs; }
public LocalSessionTracker(SessionExpirer expirer, ConcurrentMap<Long, Integer> sessionsWithTimeouts, int tickTime, long id, ZooKeeperServerListener listener) { super(expirer, sessionsWithTimeouts, tickTime, id, listener); }