Policy
public final class DynamicPolicy extends java.lang.Object implements Policy
setReset()
.
Might be used together with DynamicSegment
.Constructor | Description |
---|---|
DynamicPolicy() |
|
DynamicPolicy(java.lang.String argument) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
continueCurrentFile(byte[] entry) |
Checks if a log entry can be appended to the current log file.
|
boolean |
continueExistingFile(java.lang.String path) |
Checks if an existing log file can be continued.
|
void |
reset() |
Resets this policy as a new log file has been started.
|
static void |
setReset() |
Sets the reset flag to trigger a reset.
|
public DynamicPolicy()
public DynamicPolicy(java.lang.String argument)
argument
- Should be always null
as dynamic policy does not support argumentspublic boolean continueExistingFile(java.lang.String path)
Policy
continueExistingFile
in interface Policy
path
- Path to log filetrue
if existing log file can be continued, false
if a new log file should be createdpublic boolean continueCurrentFile(byte[] entry)
Policy
continueCurrentFile
in interface Policy
entry
- Log entrytrue
if log entry can be appended to the current log file, false
if a new log file should
be createdpublic void reset()
Policy
public static void setReset()
Copyright © 2022. All rights reserved.