@Override boolean isDifferent(AuditLogHandler other) { if (other instanceof InMemoryAuditLogHander == false) { return true; } return getName().equals(other.getName()); }
public InMemoryAuditLogHander(String name, int maxHistory) { super(name, IN_MEMORY_FORMATTER_NAME, maxHistory); this.items = new ArrayList<>(maxHistory); this.maxHistory = maxHistory; setFormatter(myFormatter); }
@Override public void updateInMemoryHandlerMaxHistory(String name, int maxHistory) { config.lock(); try { InMemoryAuditLogHander handler = (InMemoryAuditLogHander)config.getConfiguredHandler(name); handler.setMaxHistory(maxHistory); } finally { config.unlock(); } }
protected InMemoryAuditLogHander createHandler(final OperationContext context, final ModelNode operation) throws OperationFailedException { final String name = Util.getNameFromAddress(operation.require(OP_ADDR)); final int maxHistory = MAX_OPERATION_COUNT.resolveModelAttribute(context, operation).asInt(); return new InMemoryAuditLogHander(name, maxHistory); }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { InMemoryAuditLogHander handler = createHandler(context, operation); auditLogger.getUpdater().addHandler(handler); auditLogger.addFormatter(handler.getFormatter()); }
@Override public void updateInMemoryHandlerMaxHistory(String name, int maxHistory) { config.lock(); try { InMemoryAuditLogHander handler = (InMemoryAuditLogHander)config.getConfiguredHandler(name); handler.setMaxHistory(maxHistory); } finally { config.unlock(); } }
protected InMemoryAuditLogHander createHandler(final OperationContext context, final ModelNode operation) throws OperationFailedException { final String name = Util.getNameFromAddress(operation.require(OP_ADDR)); final int maxHistory = MAX_OPERATION_COUNT.resolveModelAttribute(context, operation).asInt(); return new InMemoryAuditLogHander(name, maxHistory); }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { InMemoryAuditLogHander handler = createHandler(context, operation); auditLogger.getUpdater().addHandler(handler); auditLogger.addFormatter(handler.getFormatter()); }
public InMemoryAuditLogHander(String name, int maxHistory) { super(name, IN_MEMORY_FORMATTER_NAME, maxHistory); this.items = new ArrayList<>(maxHistory); this.maxHistory = maxHistory; setFormatter(myFormatter); }
@Override boolean isDifferent(AuditLogHandler other) { if (other instanceof InMemoryAuditLogHander == false) { return true; } return getName().equals(other.getName()); }