Class PositionBasedImportIndexHandler
java.lang.Object
io.camunda.optimize.service.importing.PositionBasedImportIndexHandler
- All Implemented Interfaces:
ImportIndexHandler<PositionBasedImportPage,,PositionBasedImportIndexDto> ZeebeImportIndexHandler<PositionBasedImportPage,PositionBasedImportIndexDto>
- Direct Known Subclasses:
ZeebeIncidentImportIndexHandler,ZeebeProcessDefinitionImportIndexHandler,ZeebeProcessInstanceImportIndexHandler,ZeebeUserTaskImportIndexHandler,ZeebeVariableImportIndexHandler
@Scope("prototype")
public abstract class PositionBasedImportIndexHandler
extends Object
implements ZeebeImportIndexHandler<PositionBasedImportPage,PositionBasedImportIndexDto>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringStates the database document name where the index information should be stored.Creates a data transfer object (DTO) of the current index state.Retrieves all information of the next page to import.longlonglonglongprotected voidinit()booleanvoidResets the import index such that it can start the import all over again.voidupdateLastImportExecutionTimestamp(OffsetDateTime timestamp) voidupdateLastPersistedEntityPositionAndSequence(long position, long sequence) voidupdatePendingLastEntityPositionAndSequence(long position, long sequence) void
-
Field Details
-
dataSource
-
-
Constructor Details
-
PositionBasedImportIndexHandler
public PositionBasedImportIndexHandler()
-
-
Method Details
-
init
@PostConstruct protected void init() -
getDataSource
- Specified by:
getDataSourcein interfaceZeebeImportIndexHandler<PositionBasedImportPage,PositionBasedImportIndexDto>
-
getNextPage
Description copied from interface:ImportIndexHandlerRetrieves all information of the next page to import.- Specified by:
getNextPagein interfaceImportIndexHandler<PositionBasedImportPage,PositionBasedImportIndexDto>
-
getIndexStateDto
Description copied from interface:ImportIndexHandlerCreates a data transfer object (DTO) of the current index state. On every restart of Optimize this information can be used to continue the import where it stopped the last time.- Specified by:
getIndexStateDtoin interfaceImportIndexHandler<PositionBasedImportPage,PositionBasedImportIndexDto>
-
resetImportIndex
public void resetImportIndex()Description copied from interface:ImportIndexHandlerResets the import index such that it can start the import all over again. E.g., that can be helpful to import entities that were missed during the first round.- Specified by:
resetImportIndexin interfaceImportIndexHandler<PositionBasedImportPage,PositionBasedImportIndexDto>
-
getDatabaseDocID
States the database document name where the index information should be stored. -
updateLastPersistedEntityPositionAndSequence
public void updateLastPersistedEntityPositionAndSequence(long position, long sequence) -
updatePendingLastEntityPositionAndSequence
public void updatePendingLastEntityPositionAndSequence(long position, long sequence) -
updateLastImportExecutionTimestamp
-
updateTimestampOfLastPersistedEntity
-
getLastImportExecutionTimestamp
-
getTimestampOfLastPersistedEntity
-
getPersistedPositionOfLastEntity
public long getPersistedPositionOfLastEntity() -
getPersistedSequenceOfLastEntity
public long getPersistedSequenceOfLastEntity() -
getPendingPositionOfLastEntity
public long getPendingPositionOfLastEntity() -
getPendingSequenceOfLastEntity
public long getPendingSequenceOfLastEntity() -
isHasSeenSequenceField
public boolean isHasSeenSequenceField() -
getPositionBasedImportIndexReader
-