-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
PR for #4693 - sessionList is very slow v7.5 on a cluster
- Loading branch information
Showing
14 changed files
with
324 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
stroom-config/stroom-config-app/src/main/java/stroom/config/app/SessionConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package stroom.config.app; | ||
|
||
import stroom.util.config.annotations.RequiresRestart; | ||
import stroom.util.config.annotations.RequiresRestart.RestartScope; | ||
import stroom.util.shared.AbstractConfig; | ||
import stroom.util.shared.IsStroomConfig; | ||
import stroom.util.time.StroomDuration; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyDescription; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
|
||
@JsonPropertyOrder(alphabetic = true) | ||
public class SessionConfig extends AbstractConfig implements IsStroomConfig { | ||
|
||
public static final String PROP_NAME_MAX_INACTIVE_INTERVAL = "maxInactiveInterval"; | ||
|
||
public static final StroomDuration DEFAULT_MAX_INACTIVE_INTERVAL = StroomDuration.ofDays(1); | ||
|
||
private final StroomDuration maxInactiveInterval; | ||
|
||
public SessionConfig() { | ||
this.maxInactiveInterval = DEFAULT_MAX_INACTIVE_INTERVAL; | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
@JsonCreator | ||
public SessionConfig( | ||
@JsonProperty(PROP_NAME_MAX_INACTIVE_INTERVAL) final StroomDuration maxInactiveInterval) { | ||
this.maxInactiveInterval = maxInactiveInterval; | ||
} | ||
|
||
@RequiresRestart(RestartScope.UI) | ||
@JsonProperty(PROP_NAME_MAX_INACTIVE_INTERVAL) | ||
@JsonPropertyDescription("The maximum time interval between the last access of a HTTP session and " + | ||
"it being considered expired. Set to null for sessions that never expire, " + | ||
"however this will causes sessions to be held and build up in memory indefinitely, " + | ||
"so is best avoided.") | ||
public StroomDuration getMaxInactiveInterval() { | ||
return maxInactiveInterval; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "SessionConfig{" + | ||
"maxInactiveInterval=" + maxInactiveInterval + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.