Search in sources :

Example 1 with EventFloodRegulator

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator in project ovirt-engine by oVirt.

the class RemoveAuditLogByIdCommand method executeCommand.

@Override
protected void executeCommand() {
    AuditLog auditLog = getAuditLog();
    auditLogDao.remove(getParameters().getAuditLogId());
    setAuditLogDetails(auditLog);
    // clear the id so the auditLog will be considered as a system-level auditLog
    auditLog.setUserId(Guid.Empty);
    AuditLogable logableToClear = createAuditLogableImpl(auditLog);
    // clean cache manager entry (if exists)
    EventFloodRegulator eventFloodRegulator = new EventFloodRegulator(logableToClear, auditLog.getLogType());
    eventFloodRegulator.evict();
    setSucceeded(true);
}
Also used : EventFloodRegulator(org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator) AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) AuditLog(org.ovirt.engine.core.common.businessentities.AuditLog)

Aggregations

AuditLog (org.ovirt.engine.core.common.businessentities.AuditLog)1 AuditLogable (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable)1 EventFloodRegulator (org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator)1