Class PurgeService
java.lang.Object
org.jumpmind.symmetric.service.impl.AbstractService
org.jumpmind.symmetric.service.impl.PurgeService
- All Implemented Interfaces:
IPurgeService,IService
- See Also:
-
Field Summary
Fields inherited from class org.jumpmind.symmetric.service.impl.AbstractService
log, parameterService, platform, sqlTemplate, sqlTemplateDirty, symmetricDialect, tablePrefix -
Constructor Summary
ConstructorsConstructorDescriptionPurgeService(IParameterService parameterService, ISymmetricDialect symmetricDialect, IClusterService clusterService, IDataService dataService, ISequenceService sequenceService, IStatisticManager statisticManager, IExtensionService extensionService, IContextService contextService) -
Method Summary
Modifier and TypeMethodDescriptionprotected intexecutePurgeDelete(String deleteSql, Object argument) protected org.jumpmind.symmetric.service.impl.PurgeService.MinMaxDeleteSqlgetIdentifierIfUsingExists(org.jumpmind.symmetric.service.impl.PurgeService.MinMaxDeleteSql identifier) protected StringgetIdentifierName(org.jumpmind.symmetric.service.impl.PurgeService.MinMaxDeleteSql identifier) static long[]getMinMaxAvoidGaps(long minId, long maxId, List<DataGap> dataGapsExpired) Takes a range of data_ids that are about to be purged, and modifies the range to go around any expired data gaps that are being watched for data to be committed.voidpurgeAllIncomingEventsForNode(String nodeId) longpurgeIncoming(boolean force) longpurgeIncoming(Calendar retentionCutoff, boolean force) longpurgeOutgoing(boolean force) longpurgeOutgoing(Calendar retentionCutoff, boolean force) protected longpurgeOutgoingByRetentionCutoff(Calendar retentionCutoff) voidpurgeStats(boolean force) protected voidsaveContextLastId(org.jumpmind.symmetric.service.impl.PurgeService.MinMaxDeleteSql identifier, long lastId) protected intselectIdsAndDelete(String selectSql, String fieldName, String deleteSql) Methods inherited from class org.jumpmind.symmetric.service.impl.AbstractService
assertNotNull, buildBatchOrderBy, buildBatchParams, buildBatchWhere, buildBatchWhereFromFilter, close, createSqlReplacementTokens, getJdbcTemplate, getParameterService, getSql, getSymmetricDialect, getTablePrefix, getTargetDialect, getTargetPlatform, getTargetPlatform, isCalledFromSymmetricAdminTool, isSet, isStreamClosedByClient, isSymmetricTable, logOnce, maxDate, readAcks, sendAck, setSqlMap, synchronize, toNodeIds, toNodeIds
-
Constructor Details
-
PurgeService
public PurgeService(IParameterService parameterService, ISymmetricDialect symmetricDialect, IClusterService clusterService, IDataService dataService, ISequenceService sequenceService, IStatisticManager statisticManager, IExtensionService extensionService, IContextService contextService)
-
-
Method Details
-
purgeOutgoing
public long purgeOutgoing(boolean force) - Specified by:
purgeOutgoingin interfaceIPurgeService
-
purgeIncoming
public long purgeIncoming(boolean force) - Specified by:
purgeIncomingin interfaceIPurgeService
-
purgeOutgoing
- Specified by:
purgeOutgoingin interfaceIPurgeService
-
purgeOutgoingByRetentionCutoff
-
executePurgeDelete
-
getIdentifierIfUsingExists
protected org.jumpmind.symmetric.service.impl.PurgeService.MinMaxDeleteSql getIdentifierIfUsingExists(org.jumpmind.symmetric.service.impl.PurgeService.MinMaxDeleteSql identifier) -
getIdentifierName
protected String getIdentifierName(org.jumpmind.symmetric.service.impl.PurgeService.MinMaxDeleteSql identifier) -
saveContextLastId
protected void saveContextLastId(org.jumpmind.symmetric.service.impl.PurgeService.MinMaxDeleteSql identifier, long lastId) -
getMinMaxAvoidGaps
Takes a range of data_ids that are about to be purged, and modifies the range to go around any expired data gaps that are being watched for data to be committed. This allows statistics to be mutually exclusive for purged rows from expired data gaps and purged rows from stranded data.- Parameters:
minId- Min data ID of rangemaxId- Max data ID of rangedataGapsExpired- List of expired data gaps to avoid- Returns:
-
purgeIncoming
- Specified by:
purgeIncomingin interfaceIPurgeService
-
purgeStats
public void purgeStats(boolean force) - Specified by:
purgeStatsin interfaceIPurgeService
-
purgeAllIncomingEventsForNode
- Specified by:
purgeAllIncomingEventsForNodein interfaceIPurgeService
-
selectIdsAndDelete
-