public class SQLAuditManager extends Object implements AuditManager
X_DRUID_AUTHOR, X_DRUID_COMMENT| Constructor and Description |
|---|
SQLAuditManager(SQLMetadataConnector connector,
com.google.common.base.Supplier<MetadataStorageTablesConfig> dbTables,
com.metamx.emitter.service.ServiceEmitter emitter,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper,
SQLAuditManagerConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
doAudit(AuditEntry auditEntry)
inserts an audit Entry in the Audit Table
|
void |
doAudit(AuditEntry auditEntry,
org.skife.jdbi.v2.Handle handle)
inserts an audit Entry in audit table using the handler provided
used to do the audit in same transaction as the config changes
|
List<AuditEntry> |
fetchAuditHistory(String type,
int limit)
Provides last N entries of audit history for given type
|
List<AuditEntry> |
fetchAuditHistory(String type,
org.joda.time.Interval interval)
provides audit history for given type and interval
|
List<AuditEntry> |
fetchAuditHistory(String key,
String type,
int limit)
Provides last N entries of audit history for given key, type
|
List<AuditEntry> |
fetchAuditHistory(String key,
String type,
org.joda.time.Interval interval)
provides audit history for given key, type and interval
|
String |
getAuditTable() |
@Inject public SQLAuditManager(SQLMetadataConnector connector, com.google.common.base.Supplier<MetadataStorageTablesConfig> dbTables, com.metamx.emitter.service.ServiceEmitter emitter, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, SQLAuditManagerConfig config)
public String getAuditTable()
public void doAudit(AuditEntry auditEntry)
AuditManagerdoAudit in interface AuditManagerpublic void doAudit(AuditEntry auditEntry, org.skife.jdbi.v2.Handle handle) throws IOException
AuditManagerdoAudit in interface AuditManagerIOExceptionpublic List<AuditEntry> fetchAuditHistory(String key, String type, org.joda.time.Interval interval)
AuditManagerfetchAuditHistory in interface AuditManagerpublic List<AuditEntry> fetchAuditHistory(String type, org.joda.time.Interval interval)
AuditManagerfetchAuditHistory in interface AuditManagertype - type of auditEntryinterval - interval for which to fetch auditHistorypublic List<AuditEntry> fetchAuditHistory(String key, String type, int limit) throws IllegalArgumentException
AuditManagerfetchAuditHistory in interface AuditManagerIllegalArgumentExceptionpublic List<AuditEntry> fetchAuditHistory(String type, int limit) throws IllegalArgumentException
AuditManagerfetchAuditHistory in interface AuditManagertype - type of auditEntryIllegalArgumentExceptionCopyright © 2011–2017. All rights reserved.