@Override public Mono<Void> save() { checkMaxSessionsLimit(); // Implicitly started session.. if (!getAttributes().isEmpty()) { this.state.compareAndSet(State.NEW, State.STARTED); } if (isStarted()) { // Save InMemoryWebSessionStore.this.sessions.put(this.getId(), this); // Unless it was invalidated if (this.state.get().equals(State.EXPIRED)) { InMemoryWebSessionStore.this.sessions.remove(this.getId()); return Mono.error(new IllegalStateException("Session was invalidated")); } } return Mono.empty(); }
if (this.state.get().equals(State.EXPIRED)) { return true;
@Override public Mono<Void> save() { checkMaxSessionsLimit(); // Implicitly started session.. if (!getAttributes().isEmpty()) { this.state.compareAndSet(State.NEW, State.STARTED); } if (isStarted()) { // Save InMemoryWebSessionStore.this.sessions.put(this.getId(), this); // Unless it was invalidated if (this.state.get().equals(State.EXPIRED)) { InMemoryWebSessionStore.this.sessions.remove(this.getId()); return Mono.error(new IllegalStateException("Session was invalidated")); } } return Mono.empty(); }
@Override public boolean isStarted() { return this.state.get().equals(State.STARTED) || !getAttributes().isEmpty(); }
@Override public boolean isStarted() { return this.state.get().equals(State.STARTED) || !getAttributes().isEmpty(); }
private boolean isExpired(Instant now) { if (this.state.get().equals(State.EXPIRED)) { return true; } if (checkExpired(now)) { this.state.set(State.EXPIRED); return true; } return false; }
@Override public boolean isStarted() { return this.state.get().equals(State.STARTED) || !getAttributes().isEmpty(); }
private boolean isExpired(Instant now) { if (this.state.get().equals(State.EXPIRED)) { return true; } if (checkExpired(now)) { this.state.set(State.EXPIRED); return true; } return false; }
@Override public Mono<Void> save() { checkMaxSessionsLimit(); // Implicitly started session.. if (!getAttributes().isEmpty()) { this.state.compareAndSet(State.NEW, State.STARTED); } if (isStarted()) { // Save InMemoryWebSessionStore.this.sessions.put(this.getId(), this); // Unless it was invalidated if (this.state.get().equals(State.EXPIRED)) { InMemoryWebSessionStore.this.sessions.remove(this.getId()); return Mono.error(new IllegalStateException("Session was invalidated")); } } return Mono.empty(); }
@Override public boolean isStarted() { return this.state.get().equals(State.STARTED) || !getAttributes().isEmpty(); }
private boolean isExpired(Instant now) { if (this.state.get().equals(State.EXPIRED)) { return true; } if (checkExpired(now)) { this.state.set(State.EXPIRED); return true; } return false; }