Esempio n. 1
0
 internal ChunkedTransactionStream(Log log, StoreId storeId, long firstTxId, long txIdPromise, IOCursor <CommittedTransactionRepresentation> txCursor, CatchupServerProtocol protocol)
 {
     this._log          = log;
     this._storeId      = storeId;
     this._expectedTxId = firstTxId;
     this._txIdPromise  = txIdPromise;
     this._txCursor     = txCursor;
     this._protocol     = protocol;
 }
Esempio n. 2
0
 internal StoreCopyRequestHandler(CatchupServerProtocol protocol, System.Func <NeoStoreDataSource> dataSource, CheckPointerService checkPointerService, StoreFileStreamingProtocol storeFileStreamingProtocol, FileSystemAbstraction fs, LogProvider logProvider)
 {
     this._protocol   = protocol;
     this._dataSource = dataSource;
     this._storeFileStreamingProtocol = storeFileStreamingProtocol;
     this._fs  = fs;
     this._log = logProvider.GetLog(typeof(StoreCopyRequestHandler));
     this._checkPointerService = checkPointerService;
 }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup()
        public virtual void Setup()
        {
            _catchupServerProtocol = new CatchupServerProtocol();
            _catchupServerProtocol.expect(CatchupServerProtocol.State.GET_STORE_FILE);
            StoreCopyRequestHandler storeCopyRequestHandler = new NiceStoreCopyRequestHandler(this, _catchupServerProtocol, () => _neoStoreDataSource, new StoreFileStreamingProtocol(), _fileSystemAbstraction, NullLogProvider.Instance);
            Dependencies            dependencies            = new Dependencies();

            when(_neoStoreDataSource.StoreId).thenReturn(new Org.Neo4j.Storageengine.Api.StoreId(1, 2, 5, 3, 4));
            when(_neoStoreDataSource.DependencyResolver).thenReturn(dependencies);
            when(_neoStoreDataSource.DatabaseLayout).thenReturn(DatabaseLayout.of(new File(".")));
            _embeddedChannel = new EmbeddedChannel(storeCopyRequestHandler);
        }
Esempio n. 4
0
        public TxPullRequestHandler(CatchupServerProtocol protocol, System.Func <StoreId> storeIdSupplier, System.Func <bool> databaseAvailable, System.Func <NeoStoreDataSource> dataSourceSupplier, Monitors monitors, LogProvider logProvider)
        {
            this._protocol          = protocol;
            this._storeIdSupplier   = storeIdSupplier;
            this._databaseAvailable = databaseAvailable;
            DependencyResolver dependencies = dataSourceSupplier().DependencyResolver;

            this._transactionIdStore      = dependencies.ResolveDependency(typeof(TransactionIdStore));
            this._logicalTransactionStore = dependencies.ResolveDependency(typeof(LogicalTransactionStore));
            this._monitor = monitors.NewMonitor(typeof(TxPullRequestsMonitor));
            this._log     = logProvider.getLog(this.GetType());
        }
Esempio n. 5
0
        private PrepareStoreCopyRequestHandler CreateHandler()
        {
            _catchupServerProtocol = new CatchupServerProtocol();
            _catchupServerProtocol.expect(CatchupServerProtocol.State.PREPARE_STORE_COPY);
            System.Func <NeoStoreDataSource> dataSourceSupplier = () => _neoStoreDataSource;
            when(_neoStoreDataSource.StoreId).thenReturn(new Org.Neo4j.Storageengine.Api.StoreId(1, 2, 5, 3, 4));

            PrepareStoreCopyFilesProvider prepareStoreCopyFilesProvider = mock(typeof(PrepareStoreCopyFilesProvider));

            when(prepareStoreCopyFilesProvider.PrepareStoreCopyFiles(any())).thenReturn(_prepareStoreCopyFiles);

            return(new PrepareStoreCopyRequestHandler(_catchupServerProtocol, dataSourceSupplier, prepareStoreCopyFilesProvider));
        }
Esempio n. 6
0
 public GetIndexSnapshotRequestHandler(CatchupServerProtocol protocol, System.Func <NeoStoreDataSource> dataSource, CheckPointerService checkPointerService, StoreFileStreamingProtocol storeFileStreamingProtocol, FileSystemAbstraction fs, LogProvider logProvider) : base(protocol, dataSource, checkPointerService, storeFileStreamingProtocol, fs, logProvider)
 {
 }
Esempio n. 7
0
 public SimpleChannelInboundHandlerAnonymousInnerClass(TestCatchupServerHandler outerInstance, CatchupServerProtocol catchupServerProtocol)
 {
     this.outerInstance          = outerInstance;
     this._catchupServerProtocol = catchupServerProtocol;
 }
Esempio n. 8
0
 public override ChannelHandler GetStoreFileRequestHandler(CatchupServerProtocol catchupServerProtocol)
 {
     return(new SimpleChannelInboundHandlerAnonymousInnerClass(this, catchupServerProtocol));
 }
Esempio n. 9
0
 public override Optional <ChannelHandler> SnapshotHandler(CatchupServerProtocol catchupServerProtocol)
 {
     return(null);
 }
Esempio n. 10
0
 public override ChannelHandler GetIndexSnapshotRequestHandler(CatchupServerProtocol catchupServerProtocol)
 {
     return(new SimpleChannelInboundHandlerAnonymousInnerClass3(this, catchupServerProtocol));
 }
Esempio n. 11
0
 public override ChannelHandler GetStoreIdRequestHandler(CatchupServerProtocol catchupServerProtocol)
 {
     return(new ChannelInboundHandlerAdapter());
 }
Esempio n. 12
0
 public PrepareStoreCopyRequestHandler(CatchupServerProtocol catchupServerProtocol, System.Func <NeoStoreDataSource> dataSourceSupplier, PrepareStoreCopyFilesProvider prepareStoreCopyFilesProvider)
 {
     this._protocol = catchupServerProtocol;
     this._prepareStoreCopyFilesProvider = prepareStoreCopyFilesProvider;
     this._dataSourceSupplier            = dataSourceSupplier;
 }
Esempio n. 13
0
 internal EvilStoreCopyRequestHandler(StoreCopyRequestHandlerTest outerInstance, CatchupServerProtocol protocol, System.Func <NeoStoreDataSource> dataSource, StoreFileStreamingProtocol storeFileStreamingProtocol, FileSystemAbstraction fs, LogProvider logProvider) : base(protocol, dataSource, outerInstance.checkPointerService, storeFileStreamingProtocol, fs, logProvider)
 {
     this._outerInstance = outerInstance;
 }
Esempio n. 14
0
 public override ChannelHandler storeListingRequestHandler(CatchupServerProtocol catchupServerProtocol)
 {
     return(new SimpleChannelInboundHandlerAnonymousInnerClass2(this, catchupServerProtocol));
 }
Esempio n. 15
0
 public GetStoreIdRequestHandler(CatchupServerProtocol protocol, System.Func <StoreId> storeIdSupplier)
 {
     this._protocol        = protocol;
     this._storeIdSupplier = storeIdSupplier;
 }