public class RepositoryHistoryManager extends BaseTable
Field | Type | Description |
---|---|---|
id | BIGINT | Primary Key |
owner | VARCHAR(32) | Reference:repoconnections.connectionname |
starttime | BIGINT | |
endtime | BIGINT | |
datasize | BIGINT | |
activitytype | VARCHAR(64) | |
entityid | LONGTEXT | |
resultcode | VARCHAR(255) | |
resultdesc | LONGTEXT |
Modifier and Type | Field and Description |
---|---|
static String |
_rcsid |
protected static String |
activityTypeField |
protected static String |
dataSizeField |
protected static String |
endTimeField |
protected static String |
entityIdentifierField |
protected static String |
idField |
protected ILockManager |
lockManager
A lock manager handle.
|
protected static String |
ownerNameField |
protected static String |
resultCodeField |
protected static String |
resultDescriptionField |
protected static String |
startTimeField |
protected IThreadContext |
threadContext
Thread context
|
dbInterface, tableName
Constructor and Description |
---|
RepositoryHistoryManager(IThreadContext tc,
IDBInterface database)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addBucketExtract(StringBuilder sb,
ArrayList list,
String columnPrefix,
String columnName,
BucketDescription bucketDesc)
Turn a bucket description into a return column.
|
protected boolean |
addCriteria(StringBuilder sb,
ArrayList list,
String fieldPrefix,
String connectionName,
FilterCriteria criteria,
boolean whereEmitted)
Add criteria clauses to query.
|
protected void |
addLimits(StringBuilder sb,
int startRow,
int maxRowCount)
Add limit and offset.
|
protected void |
addOrdering(StringBuilder sb,
String[] completeFieldList,
SortOrder sort)
Add ordering.
|
Long |
addRow(String connectionName,
long startTime,
long endTime,
long dataSize,
String activityType,
String entityIdentifier,
String resultCode,
String resultDescription)
Add row to table, and reanalyze if necessary.
|
long |
countHistoryRows(String connectionName,
FilterCriteria criteria)
Count the number of rows specified by a given set of criteria.
|
void |
deinstall()
Uninstall the table.
|
void |
deleteOldRows(long timeCutoff)
Delete records older than a specified time.
|
void |
deleteOwner(String owner)
Delete all records associated with given owner.
|
protected boolean |
emitClauseStart(StringBuilder sb,
boolean whereEmitted)
Emit a WHERE or an AND, depending...
|
long |
getMaxRows()
Get the maximum number of rows a window-based report can work with.
|
void |
install(String parentTable,
String parentField)
Install or upgrade the table.
|
IResultSet |
maxActivityCountReport(String connectionName,
FilterCriteria filterCriteria,
SortOrder sort,
BucketDescription idBucket,
long interval,
int startRow,
int maxRowCount)
Get a bucketed history, with sliding window, of maximum activity level.
|
IResultSet |
maxByteCountReport(String connectionName,
FilterCriteria filterCriteria,
SortOrder sort,
BucketDescription idBucket,
long interval,
int startRow,
int maxRowCount)
Get a bucketed history, with sliding window, of maximum byte count.
|
IResultSet |
resultCodesReport(String connectionName,
FilterCriteria filterCriteria,
SortOrder sort,
BucketDescription resultCodeBucket,
BucketDescription idBucket,
int startRow,
int maxRowCount)
Get a bucketed history of different result code/identifier combinations.
|
IResultSet |
simpleReport(String connectionName,
FilterCriteria criteria,
SortOrder sort,
int startRow,
int maxRowCount)
Get a simple history, based on the passed-in filtering criteria and sort order.
|
addTableIndex, analyzeTable, beginTransaction, buildConjunctionClause, constructCountClause, constructDistinctOnClause, constructDoubleCastClause, constructOffsetLimitClause, constructRegexpClause, constructSubstringClause, endTransaction, findConjunctionClauseMax, getDatabaseCacheKey, getDBInterface, getMaxInClause, getMaxOrClause, getSleepAmt, getTableIndexes, getTableName, getTableSchema, getTransactionID, getWindowedReportMaxRows, makeTableKey, noteModifications, performAddIndex, performAlter, performCommit, performCreate, performDelete, performDrop, performInsert, performModification, performQuery, performQuery, performRemoveIndex, performUpdate, prepareRowForSave, readRow, reindexTable, signalRollback, sleepFor
public static final String _rcsid
protected static final String idField
protected static final String ownerNameField
protected static final String startTimeField
protected static final String endTimeField
protected static final String dataSizeField
protected static final String activityTypeField
protected static final String entityIdentifierField
protected static final String resultCodeField
protected static final String resultDescriptionField
protected IThreadContext threadContext
protected final ILockManager lockManager
public RepositoryHistoryManager(IThreadContext tc, IDBInterface database) throws ManifoldCFException
database
- is the database instance.ManifoldCFException
public void install(String parentTable, String parentField) throws ManifoldCFException
parentTable
- is the parent table.parentField
- is the parent field.ManifoldCFException
public void deinstall() throws ManifoldCFException
ManifoldCFException
public void deleteOwner(String owner) throws ManifoldCFException
owner
- is the name of the owner.invKeys
- are the invalidation keys.ManifoldCFException
public void deleteOldRows(long timeCutoff) throws ManifoldCFException
timeCutoff
- is the time, earlier than which records are removed.ManifoldCFException
public Long addRow(String connectionName, long startTime, long endTime, long dataSize, String activityType, String entityIdentifier, String resultCode, String resultDescription) throws ManifoldCFException
ManifoldCFException
public IResultSet simpleReport(String connectionName, FilterCriteria criteria, SortOrder sort, int startRow, int maxRowCount) throws ManifoldCFException
ManifoldCFException
public long countHistoryRows(String connectionName, FilterCriteria criteria) throws ManifoldCFException
connectionName
- is the name of the connection.criteria
- is the filtering criteria, which selects the records of interest.ManifoldCFException
public long getMaxRows() throws ManifoldCFException
ManifoldCFException
public IResultSet maxActivityCountReport(String connectionName, FilterCriteria filterCriteria, SortOrder sort, BucketDescription idBucket, long interval, int startRow, int maxRowCount) throws ManifoldCFException
ManifoldCFException
public IResultSet maxByteCountReport(String connectionName, FilterCriteria filterCriteria, SortOrder sort, BucketDescription idBucket, long interval, int startRow, int maxRowCount) throws ManifoldCFException
ManifoldCFException
public IResultSet resultCodesReport(String connectionName, FilterCriteria filterCriteria, SortOrder sort, BucketDescription resultCodeBucket, BucketDescription idBucket, int startRow, int maxRowCount) throws ManifoldCFException
ManifoldCFException
protected void addBucketExtract(StringBuilder sb, ArrayList list, String columnPrefix, String columnName, BucketDescription bucketDesc)
protected boolean addCriteria(StringBuilder sb, ArrayList list, String fieldPrefix, String connectionName, FilterCriteria criteria, boolean whereEmitted)
protected boolean emitClauseStart(StringBuilder sb, boolean whereEmitted)
protected void addOrdering(StringBuilder sb, String[] completeFieldList, SortOrder sort)
protected void addLimits(StringBuilder sb, int startRow, int maxRowCount)