From eb0da565f3a53d52d00df8a1042fff9bc34dc031 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Wed, 30 Jul 2014 12:01:23 -0500 Subject: [PATCH] Reorder SessionRepository methods Fixes #29 --- .../session/SessionRepository.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/spring-session/src/main/java/org/springframework/session/SessionRepository.java b/spring-session/src/main/java/org/springframework/session/SessionRepository.java index 28bb97c1..4949c3fb 100644 --- a/spring-session/src/main/java/org/springframework/session/SessionRepository.java +++ b/spring-session/src/main/java/org/springframework/session/SessionRepository.java @@ -22,6 +22,18 @@ package org.springframework.session; * @since 1.0 */ public interface SessionRepository { + + /** + * Creates a new {@link Session} that is capable of being persisted by this {@link SessionRepository}. + * + *

This allows optimizations and customizations in how the {@link Session} is persisted. For example, the + * implementation returned might keep track of the changes ensuring that only the delta needs to be persisted on + * a save.

+ * + * @return a new {@link Session} that is capable of being persisted by this {@link SessionRepository} + */ + S createSession(); + /** * Ensures the {@link Session} created by {@link org.springframework.session.SessionRepository#createSession()} is saved. * @@ -46,15 +58,4 @@ public interface SessionRepository { * @param id the {@link org.springframework.session.Session#getId()} to delete */ void delete(String id); - - /** - * Creates a new {@link Session} that is capable of being persisted by this {@link SessionRepository}. - * - *

This allows optimizations and customizations in how the {@link Session} is persisted. For example, the - * implementation returned might keep track of the changes ensuring that only the delta needs to be persisted on - * a save.

- * - * @return a new {@link Session} that is capable of being persisted by this {@link SessionRepository} - */ - S createSession(); } \ No newline at end of file