public class ESAuditChangeFinder extends AuditChangeFinder
 The structure of the query executed by the AuditChangeFinder is:
 
from LogEntry log where log.repositoryId = :repositoryId + AND if ActiveRoots (activeRoots) NOT empty from LogEntry log where log.repositoryId = :repositoryId and ( LIST_DOC_EVENTS_IDS_QUERY and ( ROOT_PATHS or COLECTIONS_PATHS) or (log.category = 'NuxeoDrive' and log.eventId != 'rootUnregistered') ) if ActiveRoots EMPTY: from LogEntry log where log.repositoryId = :repositoryId and ((log.category = 'NuxeoDrive' and log.eventId != 'rootUnregistered')) + AND (log.id > :lowerBound and log.id <= :upperBound) + order by log.repositoryId asc, log.eventDate desc
| Modifier and Type | Field and Description | 
|---|---|
protected static String | 
EVENT_ID  | 
parameters| Constructor and Description | 
|---|
ESAuditChangeFinder()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected org.elasticsearch.index.query.QueryBuilder | 
buildFilterClauses(CoreSession session,
                  SynchronizationRoots activeRoots,
                  Set<String> collectionSyncRootMemberIds,
                  long lowerBound,
                  long upperBound)  | 
protected ESClient | 
getClient()  | 
protected org.elasticsearch.index.query.TermsQueryBuilder | 
getCollectionSyncRootClause(Set<String> collectionSyncRootMemberIds)  | 
protected org.elasticsearch.index.query.BoolQueryBuilder | 
getCurrentRootsClause(Set<String> rootPaths)  | 
protected org.elasticsearch.index.query.BoolQueryBuilder | 
getDriveLogsQueryClause()  | 
protected String | 
getESIndexName()  | 
protected org.elasticsearch.index.query.BoolQueryBuilder | 
getEventsClause(String category,
               String[] eventIds,
               boolean shouldMatch)  | 
protected org.elasticsearch.index.query.RangeQueryBuilder | 
getLogIdBoundsClause(long lowerBound,
                    long upperBound)  | 
long | 
getUpperBound()
Returns the last available log id in the audit log table (primary key) to be used as the upper bound of the event
 log id range clause in the change query. 
 | 
long | 
getUpperBound(Set<String> repositoryNames)
Returns the last available log id in the audit index considering events older than the last clustering
 invalidation date if clustering is enabled for at least one of the given repositories. 
 | 
protected void | 
logSearchRequest(org.elasticsearch.action.search.SearchRequest request)  | 
protected void | 
logSearchResponse(org.elasticsearch.action.search.SearchResponse response)  | 
protected List<LogEntry> | 
queryAuditEntries(CoreSession session,
                 SynchronizationRoots activeRoots,
                 Set<String> collectionSyncRootMemberIds,
                 long lowerBound,
                 long upperBound,
                 int limit)  | 
protected List<LogEntry> | 
queryESAuditEntries(CoreSession session,
                   SynchronizationRoots activeRoots,
                   Set<String> collectionSyncRootMemberIds,
                   long lowerBound,
                   long upperBound,
                   int limit)  | 
getClusteringDelay, getCollectionSyncRootFilteringClause, getCurrentRootFilteringClause, getFileSystemChanges, getFileSystemItemChange, getJPARangeClause, handleParametersprotected static final String EVENT_ID
public ESAuditChangeFinder()
protected List<LogEntry> queryESAuditEntries(CoreSession session, SynchronizationRoots activeRoots, Set<String> collectionSyncRootMemberIds, long lowerBound, long upperBound, int limit)
protected org.elasticsearch.index.query.QueryBuilder buildFilterClauses(CoreSession session, SynchronizationRoots activeRoots, Set<String> collectionSyncRootMemberIds, long lowerBound, long upperBound)
protected org.elasticsearch.index.query.RangeQueryBuilder getLogIdBoundsClause(long lowerBound, long upperBound)
protected org.elasticsearch.index.query.TermsQueryBuilder getCollectionSyncRootClause(Set<String> collectionSyncRootMemberIds)
protected org.elasticsearch.index.query.BoolQueryBuilder getCurrentRootsClause(Set<String> rootPaths)
protected org.elasticsearch.index.query.BoolQueryBuilder getDriveLogsQueryClause()
protected org.elasticsearch.index.query.BoolQueryBuilder getEventsClause(String category, String[] eventIds, boolean shouldMatch)
public long getUpperBound()
AuditChangeFindergetUpperBound in interface FileSystemChangeFindergetUpperBound in class AuditChangeFinderpublic long getUpperBound(Set<String> repositoryNames)
DocumentModel further fetched from the session using the audit entry doc id is fresh.getUpperBound in interface FileSystemChangeFindergetUpperBound in class AuditChangeFinderprotected List<LogEntry> queryAuditEntries(CoreSession session, SynchronizationRoots activeRoots, Set<String> collectionSyncRootMemberIds, long lowerBound, long upperBound, int limit)
queryAuditEntries in class AuditChangeFinderprotected String getESIndexName()
protected void logSearchRequest(org.elasticsearch.action.search.SearchRequest request)
protected void logSearchResponse(org.elasticsearch.action.search.SearchResponse response)
Copyright © 2019 Nuxeo. All rights reserved.