public class FullQueryLogger extends java.lang.Object implements IAuditLogger
Modifier and Type | Class and Description |
---|---|
static class |
FullQueryLogger.Batch |
static class |
FullQueryLogger.Query |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BATCH |
static java.lang.String |
BATCH_TYPE |
protected boolean |
blocking |
static long |
CURRENT_VERSION |
static java.lang.String |
GENERATED_NOW_IN_SECONDS |
static java.lang.String |
GENERATED_TIMESTAMP |
static java.lang.String |
KEYSPACE |
protected static org.slf4j.Logger |
logger |
protected java.nio.file.Path |
path |
static java.lang.String |
PROTOCOL_VERSION |
static java.lang.String |
QUERIES |
static java.lang.String |
QUERY |
static java.lang.String |
QUERY_OPTIONS |
static java.lang.String |
QUERY_START_TIME |
static java.lang.String |
SINGLE_QUERY |
static java.lang.String |
TYPE |
static java.lang.String |
VALUES |
static java.lang.String |
VERSION |
Constructor and Description |
---|
FullQueryLogger() |
Modifier and Type | Method and Description |
---|---|
void |
configure(java.nio.file.Path path,
java.lang.String rollCycle,
boolean blocking,
int maxQueueWeight,
long maxLogSize,
boolean cleanDirectory,
java.lang.String archiveCommand,
int maxArchiveRetries)
Configure the global instance of the FullQueryLogger
|
void |
configure(java.nio.file.Path path,
java.lang.String rollCycle,
boolean blocking,
int maxQueueWeight,
long maxLogSize,
java.lang.String archiveCommand,
int maxArchiveRetries)
Configure the global instance of the FullQueryLogger.
|
boolean |
enabled()
Check whether the full query log is enabled.
|
void |
log(AuditLogEntry entry)
Logs AuditLogEntry.
|
java.nio.file.Path |
path() |
void |
reset(java.lang.String fullQueryLogPath)
Need the path as a parameter as well because if the process is restarted the config file might be the only
location for retrieving the path to the full query log files, but JMX also allows you to specify a path
that isn't persisted anywhere so we have to clean that one a well.
|
void |
stop()
Stop the full query log leaving behind any generated files.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enabled, path, stop
public static final long CURRENT_VERSION
public static final java.lang.String VERSION
public static final java.lang.String TYPE
public static final java.lang.String PROTOCOL_VERSION
public static final java.lang.String QUERY_OPTIONS
public static final java.lang.String QUERY_START_TIME
public static final java.lang.String GENERATED_TIMESTAMP
public static final java.lang.String GENERATED_NOW_IN_SECONDS
public static final java.lang.String KEYSPACE
public static final java.lang.String BATCH
public static final java.lang.String SINGLE_QUERY
public static final java.lang.String QUERY
public static final java.lang.String BATCH_TYPE
public static final java.lang.String QUERIES
public static final java.lang.String VALUES
protected static final org.slf4j.Logger logger
protected volatile boolean blocking
protected java.nio.file.Path path
public void log(AuditLogEntry entry)
IAuditLogger
IAuditLogger.stop()
,
hence implementations need to handle the race condition.log
in interface IAuditLogger
public void configure(java.nio.file.Path path, java.lang.String rollCycle, boolean blocking, int maxQueueWeight, long maxLogSize, java.lang.String archiveCommand, int maxArchiveRetries)
path
- Dedicated path where the FQL can store it's files.rollCycle
- How often to roll FQL log segments so they can potentially be reclaimedblocking
- Whether the FQL should block if the FQL falls behind or should drop log recordsmaxQueueWeight
- Maximum weight of in memory queue for records waiting to be written to the file before blocking or droppingmaxLogSize
- Maximum size of the rolled files to retain on disk before deleting the oldest filearchiveCommand
- the archive command to execute on rolled log filesmaxArchiveRetries
- max number of retries of failed archive commandspublic void configure(java.nio.file.Path path, java.lang.String rollCycle, boolean blocking, int maxQueueWeight, long maxLogSize, boolean cleanDirectory, java.lang.String archiveCommand, int maxArchiveRetries)
path
- Dedicated path where the FQL can store it's files.rollCycle
- How often to roll FQL log segments so they can potentially be reclaimedblocking
- Whether the FQL should block if the FQL falls behind or should drop log recordsmaxQueueWeight
- Maximum weight of in memory queue for records waiting to be written to the file before blocking or droppingmaxLogSize
- Maximum size of the rolled files to retain on disk before deleting the oldest filecleanDirectory
- Indicates to clean the directory before starting FullQueryLogger or notarchiveCommand
- the archive command to execute on rolled log filesmaxArchiveRetries
- max number of retries of failed archive commandspublic java.nio.file.Path path()
path
in interface IAuditLogger
public void reset(java.lang.String fullQueryLogPath)
public void stop()
stop
in interface IAuditLogger
public boolean enabled()
enabled
in interface IAuditLogger
Copyright © 2009-2019 The Apache Software Foundation