Package fr.gouv.vitam.storage.engine.server.storagelog

# Class StorageLogService

java.lang.Object
fr.gouv.vitam.storage.engine.server.storagelog.StorageLogService

All Implemented Interfaces:
  `VitamAutoCloseable`, `StorageLog`, `AutoCloseable`

public class StorageLogService extends Object implements StorageLog

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ACCESS_LOG_DIR`
  `static final String`
  `WRITE_LOG_DIR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StorageLogService(List<Integer> tenants, Path basePath)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  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)`
  `void`
  `initializeStorageLogs()`
  `List<LogInformation>`
  `rotateLogFile(Integer tenant, boolean isWriteOperation)`
  Rotate log file, and return previous log information

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### WRITE_LOG_DIR

    public static final String WRITE_LOG_DIR
    See Also:
      - Constant Field Values

  - ### ACCESS_LOG_DIR

    public static final String ACCESS_LOG_DIR
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### StorageLogService

    public StorageLogService(List<Integer> tenants, Path basePath) throws IOException
    Constructor.
    Parameters:
      `tenants` -
      `basePath` -
    Throws:
      `IOException`

- ## Method Details

  - ### appendWriteLog

    public void appendWriteLog(Integer tenant, StorageLogbookParameters parameters) throws IOException
    Description copied from interface: `StorageLog`
    Add a storage write operation log entry.
    Specified by:
      `appendWriteLog` in interface `StorageLog`
    Parameters:
      `parameters` - the entry parameters
    Throws:
      `IOException` - if an error is encountered

  - ### appendAccessLog

    public void appendAccessLog(Integer tenant, AccessLogParameters parameters) throws IOException
    Description copied from interface: `StorageLog`
    Add a storage access operation log entry.
    Specified by:
      `appendAccessLog` in interface `StorageLog`
    Parameters:
      `parameters` - the entry parameters
    Throws:
      `IOException` - if an error is encountered

  - ### rotateLogFile

    public List<LogInformation> rotateLogFile(Integer tenant, boolean isWriteOperation) throws IOException
    Description copied from interface: `StorageLog`
    Rotate log file, and return previous log information
    Specified by:
      `rotateLogFile` in interface `StorageLog`
    Parameters:
      `tenant` - tenant used for the rotation
      `isWriteOperation` -
    Throws:
      `IOException`

  - ### initializeStorageLogs

    public void initializeStorageLogs() throws IOException
    Specified by:
      `initializeStorageLogs` in interface `StorageLog`
    Throws:
      `IOException`

  - ### getFileName

    public String getFileName(boolean isWriteOperation)
    Specified by:
      `getFileName` in interface `StorageLog`

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `VitamAutoCloseable`