Skip to content

Commit

Permalink
Make MongoSession public final
Browse files Browse the repository at this point in the history
Closes gh-2217
  • Loading branch information
James Doyle authored and marcusdacoregio committed Jun 17, 2024
1 parent 3bf3468 commit a7fe5e1
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* @author Greg Turnquist
* @since 1.2
*/
class MongoSession implements Session {
public final class MongoSession implements Session {

/**
* Mongo doesn't support {@literal dot} in field names. We replace it with a unicode
Expand Down Expand Up @@ -74,20 +74,19 @@ class MongoSession implements Session {
* @param sessionId the session id to use
* @since 3.2
*/
MongoSession(String sessionId) {
public MongoSession(String sessionId) {
this(sessionId, MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS);
}

MongoSession() {
public MongoSession() {
this(MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS);
}

MongoSession(long maxInactiveIntervalInSeconds) {
public MongoSession(long maxInactiveIntervalInSeconds) {
this(UuidSessionIdGenerator.getInstance().generate(), maxInactiveIntervalInSeconds);
}

MongoSession(String id, long maxInactiveIntervalInSeconds) {

public MongoSession(String id, long maxInactiveIntervalInSeconds) {
this.id = id;
this.originalSessionId = id;
this.intervalSeconds = maxInactiveIntervalInSeconds;
Expand All @@ -99,7 +98,7 @@ class MongoSession implements Session {
* @param sessionIdGenerator the {@link SessionIdGenerator} to use
* @since 3.2
*/
MongoSession(SessionIdGenerator sessionIdGenerator) {
public MongoSession(SessionIdGenerator sessionIdGenerator) {
this(sessionIdGenerator.generate(), MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS);
this.sessionIdGenerator = sessionIdGenerator;
}
Expand Down

0 comments on commit a7fe5e1

Please sign in to comment.