Revert "SessionRepository.save returns S"
See gh-809
This commit is contained in:
@@ -76,9 +76,8 @@ public class MapSessionRepository implements SessionRepository<Session> {
|
||||
this.defaultMaxInactiveInterval = Integer.valueOf(defaultMaxInactiveInterval);
|
||||
}
|
||||
|
||||
public Session save(Session session) {
|
||||
public void save(Session session) {
|
||||
this.sessions.put(session.getId(), new MapSession(session));
|
||||
return session;
|
||||
}
|
||||
|
||||
public Session findById(String id) {
|
||||
|
||||
@@ -52,7 +52,7 @@ public interface SessionRepository<S extends Session> {
|
||||
*
|
||||
* @param session the {@link Session} to save
|
||||
*/
|
||||
S save(S session);
|
||||
void save(S session);
|
||||
|
||||
/**
|
||||
* Gets the {@link Session} by the {@link Session#getId()} or null if no
|
||||
|
||||
@@ -386,14 +386,13 @@ public class RedisOperationsSessionRepository implements
|
||||
this.redisFlushMode = redisFlushMode;
|
||||
}
|
||||
|
||||
public RedisSession save(RedisSession session) {
|
||||
public void save(RedisSession session) {
|
||||
session.saveDelta();
|
||||
if (session.isNew()) {
|
||||
String sessionCreatedKey = getSessionCreatedChannel(session.getId());
|
||||
this.sessionRedisOperations.convertAndSend(sessionCreatedKey, session.delta);
|
||||
session.setNew(false);
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
@Scheduled(cron = "${spring.session.cleanup.cron.expression:0 * * * * *}")
|
||||
|
||||
@@ -202,13 +202,12 @@ public class HazelcastSessionRepository implements
|
||||
return result;
|
||||
}
|
||||
|
||||
public HazelcastSession save(HazelcastSession session) {
|
||||
public void save(HazelcastSession session) {
|
||||
if (session.isChanged()) {
|
||||
this.sessions.put(session.getId(), session.getDelegate(),
|
||||
session.getMaxInactiveInterval().getSeconds(), TimeUnit.SECONDS);
|
||||
session.markUnchanged();
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
public HazelcastSession findById(String id) {
|
||||
|
||||
@@ -371,7 +371,7 @@ public class JdbcOperationsSessionRepository implements
|
||||
return session;
|
||||
}
|
||||
|
||||
public JdbcSession save(final JdbcSession session) {
|
||||
public void save(final JdbcSession session) {
|
||||
if (session.isNew()) {
|
||||
this.transactionOperations.execute(new TransactionCallbackWithoutResult() {
|
||||
|
||||
@@ -458,7 +458,6 @@ public class JdbcOperationsSessionRepository implements
|
||||
});
|
||||
}
|
||||
session.clearChangeFlags();
|
||||
return session;
|
||||
}
|
||||
|
||||
public JdbcSession findById(final String id) {
|
||||
|
||||
Reference in New Issue
Block a user