public void setTimeToKeepState(long timeToKeepState) { this.timeToKeepState = timeToKeepState; if (timeToKeepState > 0) { prepareCheckpointMap(); } }
public void setTimeToKeepState(long timeToKeepState) { this.timeToKeepState = timeToKeepState; if (timeToKeepState > 0) { prepareCheckpointMap(); } }
public void setTimeToKeepState(long timeToKeepState) { this.timeToKeepState = timeToKeepState; if (timeToKeepState > 0) { prepareCheckpointMap(); } }
protected ClientState getState() { LocalClientState cs = state.get(Thread.currentThread()); if (cs == null) { cs = new LocalClientState(initialState); state.put(Thread.currentThread(), cs); if (timeToKeepState > 0) { prepareCheckpointMap(); long currentTime = System.currentTimeMillis(); checkpointMap.put(Thread.currentThread(), currentTime); Thread clThread = new CleanupThread(Thread.currentThread(), currentTime); clThread.setName("Client state cleanup thread " + clThread.hashCode()); clThread.start(); } } return cs; }
protected ClientState getState() { LocalClientState cs = state.get(Thread.currentThread()); if (cs == null) { cs = new LocalClientState(initialState); state.put(Thread.currentThread(), cs); if (timeToKeepState > 0) { prepareCheckpointMap(); long currentTime = System.currentTimeMillis(); checkpointMap.put(Thread.currentThread(), currentTime); Thread clThread = new CleanupThread(Thread.currentThread(), currentTime); clThread.setName("Client state cleanup thread " + clThread.hashCode()); clThread.start(); } } return cs; }
protected ClientState getState() { LocalClientState cs = state.get(Thread.currentThread()); if (cs == null) { cs = new LocalClientState(initialState); state.put(Thread.currentThread(), cs); if (timeToKeepState > 0) { prepareCheckpointMap(); long currentTime = System.currentTimeMillis(); checkpointMap.put(Thread.currentThread(), currentTime); new CleanupThread(Thread.currentThread(), currentTime).start(); } } return cs; }