Annotation Interface OnIdleCheck
The annotated methods are invoked with one optional argument `ControllerIoState` to check the idleness of controllers.
The lowest value of the longs returned by the methods is used as a delay in milliseconds after which the methods are invoked next time.
If the lowest value is less than zero, the corresponding controllers are scheduled to be destroyed.
@OnIdleCheck
static long onIdleCheck( ControllerIo io ){
if( io.getIdleTime() < 10000 ) {
return 1000; // Check 1 second later
} else {
return -1; // Destroy this controller
}
}
- 関連項目: