@Test public void timeoutTest() { UserInfo tUserInfo = new UserInfo(1); Assert.assertFalse(tUserInfo.timeout()); }
public synchronized boolean timeout() { return (System.currentTimeMillis() - mLastHeartbeatMs > WorkerConf.get().USER_TIMEOUT_MS); }
UserInfo { public synchronized boolean timeout() { return (System.currentTimeMillis() - mLastHeartbeatMs > WorkerConf.get().USER_TIMEOUT_MS); } }
UserInfo { public synchronized boolean timeout() { return (System.currentTimeMillis() - mLastHeartbeatMs > WorkerConf.get().USER_TIMEOUT_MS); } UserInfo(long userId); }
UserInfo { public synchronized boolean timeout() { return (System.currentTimeMillis() - mLastHeartbeatMs > WorkerConf.get().USER_TIMEOUT_MS); } UserInfo(long userId); synchronized void addOwnBytes(long addOwnBytes); synchronized long getOwnBytes(); long getUserId(); synchronized void heartbeat(); synchronized boolean timeout(); @Override synchronized String toString(); }
UserInfo { public synchronized boolean timeout() { return (System.currentTimeMillis() - mLastHeartbeatMs > WorkerConf.get().USER_TIMEOUT_MS); } UserInfo(long userId); synchronized void addOwnBytes(long addOwnBytes); synchronized long getOwnBytes(); long getUserId(); synchronized void heartbeat(); synchronized boolean timeout(); @Override synchronized String toString();  }