Exemple #1
0
 public void ModifyResponse()
 {
     if (Modifiers == null || ResponsePacker == null || Modifiers.Count == 0 || ResponseData.ResponseBody == null || ResponseData.ResponseBody.Length == 0)
     {
         return;
     }
     foreach (var requestModifier in Modifiers.Where(r => r.Enabled))
     {
         if (requestModifier.ModifyResponse(this))
         {
             ResponseModified = true;
         }
     }
     if (!ResponseModified)
     {
         return;
     }
     if (ModifiedResponseData == null)
     {
         ModifiedResponseData = new ResponseData();
         ModifiedResponseData.ResponseBody = ResponsePacker.GenerateResponseBody(ResponseData);
     }
     else
     {
         ModifiedResponseData.ResponseBody = ResponsePacker.GenerateResponseBody(ModifiedResponseData);
     }
     _rawContext.ModifiedResponseBody = ModifiedResponseData.ResponseBody;
     ParseResponse(ResponseData);
     ParseResponse(ModifiedResponseData);
 }
Exemple #2
0
 public BackupImpl(StoreCopyServer storeCopyServer, LogicalTransactionStore logicalTransactionStore, TransactionIdStore transactionIdStore, LogFileInformation logFileInformation, System.Func <StoreId> storeId, LogProvider logProvider)
 {
     this._storeCopyServer         = storeCopyServer;
     this._logicalTransactionStore = logicalTransactionStore;
     this._transactionIdStore      = transactionIdStore;
     this._logFileInformation      = logFileInformation;
     this._storeId = storeId;
     this._logger  = logProvider.getLog(this.GetType()).InfoLogger();
     this._incrementalResponsePacker = new ResponsePacker(logicalTransactionStore, transactionIdStore, storeId);
 }
Exemple #3
0
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: public org.neo4j.com.Response<?> copyStore(StoreWriter writer)
            public override Response <object> CopyStore(StoreWriter writer)
            {
                NeoStoreDataSource neoStoreDataSource = Original.DependencyResolver.resolveDependency(typeof(NeoStoreDataSource));

                TransactionIdStore transactionIdStore = Original.DependencyResolver.resolveDependency(typeof(TransactionIdStore));

                LogicalTransactionStore logicalTransactionStore = Original.DependencyResolver.resolveDependency(typeof(LogicalTransactionStore));

                CheckPointer checkPointer = Original.DependencyResolver.resolveDependency(typeof(CheckPointer));

                RequestContext requestContext = (new StoreCopyServer(neoStoreDataSource, checkPointer, Fs, OriginalDir, (new Monitors()).newMonitor(typeof(StoreCopyServer.Monitor)))).flushStoresAndStreamStoreFiles("test", writer, IncludeLogs);

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.storageengine.api.StoreId storeId = original.getDependencyResolver().resolveDependency(org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.class).getStoreId();
                StoreId storeId = Original.DependencyResolver.resolveDependency(typeof(RecordStorageEngine)).StoreId;

                ResponsePacker responsePacker = new ResponsePacker(logicalTransactionStore, transactionIdStore, () => storeId);

                Response = spy(responsePacker.PackTransactionStreamResponse(requestContext, null));
                return(Response);
            }