@Override public AccountAuditLogsForObjectType getAuditLogs(final ObjectType objectType) { if (auditLogsCache.get(objectType) == null) { auditLogsCache.put(objectType, new DefaultAccountAuditLogsForObjectType(auditLevel, new ObjectTypeFilter(objectType, accountAuditLogs.iterator()))); } // Should never be null return auditLogsCache.get(objectType); }
@Override protected AuditLog computeNext() { while (accountAuditLogs.hasNext()) { final AuditLog element = accountAuditLogs.next(); if (predicate.apply(element)) { hasSeenObjectType = true; return element; } else if (hasSeenObjectType) { // Optimization trick: audit log records are ordered first by table name // (hence object type) - when we are done and we switch to another ObjectType, // we are guaranteed there is nothing left to do return endOfData(); } } return endOfData(); }
@Override protected AuditLog computeNext() { while (accountAuditLogs.hasNext()) { final AuditLog element = accountAuditLogs.next(); if (predicate.apply(element)) { hasSeenObjectType = true; return element; } else if (hasSeenObjectType) { // Optimization trick: audit log records are ordered first by table name // (hence object type) - when we are done and we switch to another ObjectType, // we are guaranteed there is nothing left to do return endOfData(); } } return endOfData(); }
@Override public AccountAuditLogsForObjectType getAuditLogs(final ObjectType objectType) { if (auditLogsCache.get(objectType) == null) { auditLogsCache.put(objectType, new DefaultAccountAuditLogsForObjectType(auditLevel, new ObjectTypeFilter(objectType, accountAuditLogs.iterator()))); } // Should never be null return auditLogsCache.get(objectType); }