Search in sources :

Example 1 with FlowFileRepository

use of org.apache.nifi.controller.repository.FlowFileRepository in project nifi by apache.

the class TestFileSystemSwapManager method createSwapManager.

private FileSystemSwapManager createSwapManager() {
    final FileSystemSwapManager swapManager = new FileSystemSwapManager();
    final ResourceClaimManager resourceClaimManager = new NopResourceClaimManager();
    final FlowFileRepository flowfileRepo = Mockito.mock(FlowFileRepository.class);
    swapManager.initialize(new SwapManagerInitializationContext() {

        @Override
        public ResourceClaimManager getResourceClaimManager() {
            return resourceClaimManager;
        }

        @Override
        public FlowFileRepository getFlowFileRepository() {
            return flowfileRepo;
        }

        @Override
        public EventReporter getEventReporter() {
            return EventReporter.NO_OP;
        }
    });
    return swapManager;
}
Also used : FlowFileRepository(org.apache.nifi.controller.repository.FlowFileRepository) ResourceClaimManager(org.apache.nifi.controller.repository.claim.ResourceClaimManager) SwapManagerInitializationContext(org.apache.nifi.controller.repository.SwapManagerInitializationContext) EventReporter(org.apache.nifi.events.EventReporter)

Aggregations

FlowFileRepository (org.apache.nifi.controller.repository.FlowFileRepository)1 SwapManagerInitializationContext (org.apache.nifi.controller.repository.SwapManagerInitializationContext)1 ResourceClaimManager (org.apache.nifi.controller.repository.claim.ResourceClaimManager)1 EventReporter (org.apache.nifi.events.EventReporter)1