to get rid of "magic" time constants
This commit is contained in:
committed by
Juergen Hoeller
parent
ed7684d2b2
commit
407ecf7334
@@ -75,7 +75,7 @@ public class WebSocketMessageBrokerStats {
|
||||
@Nullable
|
||||
private ScheduledFuture<?> loggingTask;
|
||||
|
||||
private long loggingPeriod = 30 * 60 * 1000;
|
||||
private long loggingPeriod = TimeUnit.MINUTES.toMillis(30);
|
||||
|
||||
|
||||
public void setSubProtocolWebSocketHandler(SubProtocolWebSocketHandler webSocketHandler) {
|
||||
@@ -114,7 +114,7 @@ public class WebSocketMessageBrokerStats {
|
||||
|
||||
public void setSockJsTaskScheduler(ThreadPoolTaskScheduler sockJsTaskScheduler) {
|
||||
this.sockJsTaskScheduler = sockJsTaskScheduler.getScheduledThreadPoolExecutor();
|
||||
this.loggingTask = initLoggingTask(60 * 1000);
|
||||
this.loggingTask = initLoggingTask(TimeUnit.MINUTES.toMillis(1));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -87,9 +87,9 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
|
||||
|
||||
private boolean sessionCookieNeeded = true;
|
||||
|
||||
private long heartbeatTime = 25 * 1000;
|
||||
private long heartbeatTime = TimeUnit.SECONDS.toMillis(25);
|
||||
|
||||
private long disconnectDelay = 5 * 1000;
|
||||
private long disconnectDelay = TimeUnit.SECONDS.toMillis(5 );
|
||||
|
||||
private int httpMessageCacheSize = 100;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user