-
public class FileCommand
-
-
Field Summary
Fields Modifier and Type Field Description private final PathCOMMAND_FILEprivate final DurationCHECK_INTERVALprivate final Map<String, Long>LAST_CHECK_TIMEpublic final static FileCommandINSTANCE
-
Method Summary
Modifier and Type Method Description final Booleancheck(String command, Long checkInterval)Check local command file to see if there are pending commands. final Booleancheck(String command, Duration checkInterval, Function0<Unit> action)Check local command file to see if there are pending commands Supported local file commands can be found in AppConstants CMD_* General command options are supported: -perm: the command should be always keep in the file and execute every time the command file is checked, otherwise the command is executed only final Booleancheck(String command, Duration checkInterval)Check local command file to see if there are pending commands Supported local file commands can be found in AppConstants CMD_* General command options are supported: -perm: the command should be always keep in the file and execute every time the command file is checked, otherwise the command is executed only final Booleancheck(String command)Check local command file to see if there are pending commands Supported local file commands can be found in AppConstants CMD_* General command options are supported: -perm: the command should be always keep in the file and execute every time the command file is checked, otherwise the command is executed only final PathgetCOMMAND_FILE()final DurationgetCHECK_INTERVAL()final Map<String, Long>getLAST_CHECK_TIME()-
-
Method Detail
-
check
final Boolean check(String command, Long checkInterval)
Check local command file to see if there are pending commands. Supported local file commands can be found in AppConstants CMD_* General command options are supported: -perm: the command should be always keep in the file and execute every time the command file is checked, otherwise the command is executed only
- Parameters:
command- Check if the command existscheckInterval- The check interval in seconds
-
check
@JvmOverloads() final Boolean check(String command, Duration checkInterval, Function0<Unit> action)
Check local command file to see if there are pending commands Supported local file commands can be found in AppConstants CMD_* General command options are supported: -perm: the command should be always keep in the file and execute every time the command file is checked, otherwise the command is executed only
- Parameters:
command- Check if the command existscheckInterval- The check interval
-
check
@JvmOverloads() final Boolean check(String command, Duration checkInterval)
Check local command file to see if there are pending commands Supported local file commands can be found in AppConstants CMD_* General command options are supported: -perm: the command should be always keep in the file and execute every time the command file is checked, otherwise the command is executed only
- Parameters:
command- Check if the command existscheckInterval- The check interval
-
check
@JvmOverloads() final Boolean check(String command)
Check local command file to see if there are pending commands Supported local file commands can be found in AppConstants CMD_* General command options are supported: -perm: the command should be always keep in the file and execute every time the command file is checked, otherwise the command is executed only
- Parameters:
command- Check if the command exists
-
getCOMMAND_FILE
final Path getCOMMAND_FILE()
-
getCHECK_INTERVAL
final Duration getCHECK_INTERVAL()
-
getLAST_CHECK_TIME
final Map<String, Long> getLAST_CHECK_TIME()
-
-
-
-