public class StorageLogFactory extends Object implements StorageLog
| Modifier and Type | Field and Description |
|---|---|
static String |
ACCESS_LOG_DIR |
static String |
WRITE_LOG_DIR |
| Modifier and Type | Method and Description |
|---|---|
void |
appendAccessLog(Integer tenant,
AccessLogParameters parameters)
Add a storage access operation log entry.
|
void |
appendWriteLog(Integer tenant,
StorageLogbookParameters parameters)
Add a storage write operation log entry.
|
void |
close() |
String |
getFileName(boolean isWriteOperation) |
static StorageLog |
getInstance(List<Integer> tenants,
Path basePath)
get Thread-Safe instance instance.
|
static StorageLog |
getInstanceForTest(List<Integer> tenants,
Path basePath) |
void |
initializeStorageLogs() |
List<LogInformation> |
rotateLogFile(Integer tenant,
boolean isWriteOperation)
Rotate log file, and return previous log information
|
public static final String WRITE_LOG_DIR
public static final String ACCESS_LOG_DIR
public static StorageLog getInstance(List<Integer> tenants, Path basePath) throws IOException
IOExceptionpublic static StorageLog getInstanceForTest(List<Integer> tenants, Path basePath) throws IOException
IOExceptionpublic void appendWriteLog(Integer tenant, StorageLogbookParameters parameters) throws IOException
StorageLogappendWriteLog in interface StorageLogparameters - the entry parametersIOException - if an error is encounteredpublic void appendAccessLog(Integer tenant, AccessLogParameters parameters) throws IOException
StorageLogappendAccessLog in interface StorageLogparameters - the entry parametersIOException - if an error is encounteredpublic List<LogInformation> rotateLogFile(Integer tenant, boolean isWriteOperation) throws IOException
StorageLogrotateLogFile in interface StorageLogtenant - tenant used for the rotationIOExceptionpublic void initializeStorageLogs()
throws IOException
initializeStorageLogs in interface StorageLogIOExceptionpublic String getFileName(boolean isWriteOperation)
getFileName in interface StorageLogpublic void close()
close in interface VitamAutoCloseableclose in interface AutoCloseableCopyright © 2021 Vitam. All rights reserved.