Package com.helger.photon.audit
Class DoNothingAuditManager
- java.lang.Object
-
- com.helger.photon.audit.DoNothingAuditManager
-
- All Implemented Interfaces:
IAuditManager
public final class DoNothingAuditManager extends Object implements IAuditManager
A specific implementation ofIAuditManagerthat does nothing.- Since:
- 8.4.1
- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description DoNothingAuditManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAuditorgetAuditor()StringgetBaseDir()LocalDategetEarliestAuditDate()List<IAuditItem>getLastAuditItems(int nMaxItems)booleanisInMemory()voidstop()Stop taking new audits.
-
-
-
Method Detail
-
isInMemory
public boolean isInMemory()
- Specified by:
isInMemoryin interfaceIAuditManager- Returns:
trueif this manager operates only in memory,falseif it keeps persistent files.- See Also:
IAuditManager.getBaseDir()
-
getBaseDir
@Nullable public String getBaseDir()
- Specified by:
getBaseDirin interfaceIAuditManager- Returns:
- The base directory used for audit entries. May be
nullto indicate in-memory only auditing. If the results is notnullit must end with a path separator (slash). - See Also:
IAuditManager.isInMemory()
-
getAuditor
@Nonnull public IAuditor getAuditor()
- Specified by:
getAuditorin interfaceIAuditManager- Returns:
- The underlying auditor. Never
null.
-
getLastAuditItems
@Nonnull public List<IAuditItem> getLastAuditItems(@Nonnegative int nMaxItems)
- Specified by:
getLastAuditItemsin interfaceIAuditManager- Parameters:
nMaxItems- The maximum number of items. Must be > 0.- Returns:
- The n latest audit items. Never
null.
-
stop
public void stop()
Description copied from interface:IAuditManagerStop taking new audits. Call this upon shutdown for correct cleanup! Consecutive calls to this method have no further effect.- Specified by:
stopin interfaceIAuditManager
-
getEarliestAuditDate
@Nullable public LocalDate getEarliestAuditDate()
- Specified by:
getEarliestAuditDatein interfaceIAuditManager- Returns:
- The earliest date for which auditing information is present. If
this is an in-memory audit manager, it must return the current
date. May be
nullif a persistent storage is used and no entry is present yet.
-
-