Search in sources :

Example 1 with TriggerInfo

use of org.neo4j.kernel.impl.transaction.log.checkpoint.TriggerInfo in project neo4j by neo4j.

the class CountsRotationTest method checkPoint.

private void checkPoint(GraphDatabaseAPI db) throws IOException {
    TriggerInfo triggerInfo = new SimpleTriggerInfo("test");
    db.getDependencyResolver().resolveDependency(CheckPointer.class).forceCheckPoint(triggerInfo);
}
Also used : SimpleTriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.SimpleTriggerInfo) TriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.TriggerInfo) SimpleTriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.SimpleTriggerInfo) CheckPointer(org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointer)

Example 2 with TriggerInfo

use of org.neo4j.kernel.impl.transaction.log.checkpoint.TriggerInfo in project neo4j by neo4j.

the class DefaultMasterImplSPITest method flushStoreFilesWithCorrectCheckpointTriggerName.

@Test
public void flushStoreFilesWithCorrectCheckpointTriggerName() throws IOException {
    CheckPointer checkPointer = mock(CheckPointer.class);
    NeoStoreDataSource dataSource = mock(NeoStoreDataSource.class);
    when(dataSource.listStoreFiles(anyBoolean())).thenReturn(Iterators.emptyIterator());
    DefaultMasterImplSPI master = new DefaultMasterImplSPI(mock(GraphDatabaseAPI.class, RETURNS_MOCKS), mock(FileSystemAbstraction.class), new Monitors(), mock(LabelTokenHolder.class), mock(PropertyKeyTokenHolder.class), mock(RelationshipTypeTokenHolder.class), mock(IdGeneratorFactory.class), mock(TransactionCommitProcess.class), checkPointer, mock(TransactionIdStore.class), mock(LogicalTransactionStore.class), dataSource, mock(PageCache.class), new StoreCopyCheckPointMutex());
    master.flushStoresAndStreamStoreFiles(mock(StoreWriter.class));
    TriggerInfo expectedTriggerInfo = new SimpleTriggerInfo(DefaultMasterImplSPI.STORE_COPY_CHECKPOINT_TRIGGER);
    verify(checkPointer).tryCheckPoint(expectedTriggerInfo);
}
Also used : FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) RelationshipTypeTokenHolder(org.neo4j.kernel.impl.core.RelationshipTypeTokenHolder) TransactionIdStore(org.neo4j.kernel.impl.transaction.log.TransactionIdStore) NeoStoreDataSource(org.neo4j.kernel.NeoStoreDataSource) TransactionCommitProcess(org.neo4j.kernel.impl.api.TransactionCommitProcess) TriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.TriggerInfo) SimpleTriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.SimpleTriggerInfo) IdGeneratorFactory(org.neo4j.kernel.impl.store.id.IdGeneratorFactory) LogicalTransactionStore(org.neo4j.kernel.impl.transaction.log.LogicalTransactionStore) SimpleTriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.SimpleTriggerInfo) GraphDatabaseAPI(org.neo4j.kernel.internal.GraphDatabaseAPI) PropertyKeyTokenHolder(org.neo4j.kernel.impl.core.PropertyKeyTokenHolder) StoreWriter(org.neo4j.com.storecopy.StoreWriter) CheckPointer(org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointer) Monitors(org.neo4j.kernel.monitoring.Monitors) StoreCopyCheckPointMutex(org.neo4j.kernel.impl.transaction.log.checkpoint.StoreCopyCheckPointMutex) LabelTokenHolder(org.neo4j.kernel.impl.core.LabelTokenHolder) PageCache(org.neo4j.io.pagecache.PageCache) Test(org.junit.Test)

Example 3 with TriggerInfo

use of org.neo4j.kernel.impl.transaction.log.checkpoint.TriggerInfo in project neo4j by neo4j.

the class TestLogPruning method checkPoint.

private void checkPoint() throws IOException {
    TriggerInfo triggerInfo = new SimpleTriggerInfo("test");
    db.getDependencyResolver().resolveDependency(CheckPointer.class).forceCheckPoint(triggerInfo);
}
Also used : SimpleTriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.SimpleTriggerInfo) TriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.TriggerInfo) SimpleTriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.SimpleTriggerInfo) CheckPointer(org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointer)

Aggregations

CheckPointer (org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointer)3 SimpleTriggerInfo (org.neo4j.kernel.impl.transaction.log.checkpoint.SimpleTriggerInfo)3 TriggerInfo (org.neo4j.kernel.impl.transaction.log.checkpoint.TriggerInfo)3 Test (org.junit.Test)1 StoreWriter (org.neo4j.com.storecopy.StoreWriter)1 FileSystemAbstraction (org.neo4j.io.fs.FileSystemAbstraction)1 PageCache (org.neo4j.io.pagecache.PageCache)1 NeoStoreDataSource (org.neo4j.kernel.NeoStoreDataSource)1 TransactionCommitProcess (org.neo4j.kernel.impl.api.TransactionCommitProcess)1 LabelTokenHolder (org.neo4j.kernel.impl.core.LabelTokenHolder)1 PropertyKeyTokenHolder (org.neo4j.kernel.impl.core.PropertyKeyTokenHolder)1 RelationshipTypeTokenHolder (org.neo4j.kernel.impl.core.RelationshipTypeTokenHolder)1 IdGeneratorFactory (org.neo4j.kernel.impl.store.id.IdGeneratorFactory)1 LogicalTransactionStore (org.neo4j.kernel.impl.transaction.log.LogicalTransactionStore)1 TransactionIdStore (org.neo4j.kernel.impl.transaction.log.TransactionIdStore)1 StoreCopyCheckPointMutex (org.neo4j.kernel.impl.transaction.log.checkpoint.StoreCopyCheckPointMutex)1 GraphDatabaseAPI (org.neo4j.kernel.internal.GraphDatabaseAPI)1 Monitors (org.neo4j.kernel.monitoring.Monitors)1