-
-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a new config to support for closing overtime connections fr…
…om user client automatically (#279)
- Loading branch information
Showing
5 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
src/main/java/com/github/monkeywie/proxyee/config/IdleStateCheck.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,48 @@ | ||
package com.github.monkeywie.proxyee.config; | ||
|
||
/** | ||
* @Author ffei | ||
* @Date 2023/6/24 10:27 | ||
*/ | ||
public class IdleStateCheck { | ||
private long readerIdleTime; | ||
private long writerIdleTime; | ||
private long allIdleTime; | ||
|
||
public IdleStateCheck() { | ||
this.readerIdleTime = 10; | ||
this.writerIdleTime = 15; | ||
this.allIdleTime = 20; | ||
} | ||
|
||
public IdleStateCheck(long readerIdleTime, long writerIdleTime, long allIdleTime) { | ||
this.readerIdleTime = readerIdleTime; | ||
this.writerIdleTime = writerIdleTime; | ||
this.allIdleTime = allIdleTime; | ||
} | ||
|
||
public long getReaderIdleTime() { | ||
return readerIdleTime; | ||
} | ||
|
||
public long getWriterIdleTime() { | ||
return writerIdleTime; | ||
} | ||
|
||
public long getAllIdleTime() { | ||
return allIdleTime; | ||
} | ||
|
||
public void setReaderIdleTime(long readerIdleTime) { | ||
this.readerIdleTime = readerIdleTime; | ||
} | ||
|
||
public void setWriterIdleTime(long writerIdleTime) { | ||
this.writerIdleTime = writerIdleTime; | ||
} | ||
|
||
public void setAllIdleTime(long allIdleTime) { | ||
this.allIdleTime = allIdleTime; | ||
} | ||
} | ||
|
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
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