Ejemplo n.º 1
0
 private void OnTriggerEnter(Collider other)
 {
     // If we detect suspendable object
     if (other.GetComponent <Suspendable>())
     {
         Suspendable sus = other.GetComponent <Suspendable>();
         sus.Locked();
     }
 }
Ejemplo n.º 2
0
 public CoreStateDownloader(LocalDatabase localDatabase, Suspendable suspendOnStoreCopy, RemoteStore remoteStore, CatchUpClient catchUpClient, LogProvider logProvider, StoreCopyProcess storeCopyProcess, CoreStateMachines coreStateMachines, CoreSnapshotService snapshotService, CommitStateHelper commitStateHelper)
 {
     this._localDatabase      = localDatabase;
     this._suspendOnStoreCopy = suspendOnStoreCopy;
     this._remoteStore        = remoteStore;
     this._catchUpClient      = catchUpClient;
     this._log = logProvider.getLog(this.GetType());
     this._storeCopyProcess  = storeCopyProcess;
     this._coreStateMachines = coreStateMachines;
     this._snapshotService   = snapshotService;
     this._commitStateHelper = commitStateHelper;
 }
Ejemplo n.º 3
0
        private CoreStateDownloader CreateCoreStateDownloader(Suspendable servicesToSuspendOnStoreCopy, CatchUpClient catchUpClient)
        {
            ExponentialBackoffStrategy storeCopyBackoffStrategy = new ExponentialBackoffStrategy(1, _config.get(CausalClusteringSettings.store_copy_backoff_max_wait).toMillis(), TimeUnit.MILLISECONDS);

            RemoteStore remoteStore = new RemoteStore(_logProvider, _platformModule.fileSystem, _platformModule.pageCache, new StoreCopyClient(catchUpClient, _platformModule.monitors, _logProvider, storeCopyBackoffStrategy), new TxPullClient(catchUpClient, _platformModule.monitors), new TransactionLogCatchUpFactory(), _config, _platformModule.monitors);

            CopiedStoreRecovery copiedStoreRecovery = _platformModule.life.add(new CopiedStoreRecovery(_platformModule.config, _platformModule.kernelExtensionFactories, _platformModule.pageCache));

            StoreCopyProcess storeCopyProcess = new StoreCopyProcess(_platformModule.fileSystem, _platformModule.pageCache, _localDatabase, copiedStoreRecovery, remoteStore, _logProvider);

            CommitStateHelper commitStateHelper = new CommitStateHelper(_platformModule.pageCache, _platformModule.fileSystem, _config);

            return(new CoreStateDownloader(_localDatabase, servicesToSuspendOnStoreCopy, remoteStore, catchUpClient, _logProvider, storeCopyProcess, _coreStateMachinesModule.coreStateMachines, _snapshotService, commitStateHelper));
        }
Ejemplo n.º 4
0
        public CatchupPollingProcess(LogProvider logProvider, LocalDatabase localDatabase, Suspendable enableDisableOnSoreCopy, CatchUpClient catchUpClient, UpstreamDatabaseStrategySelector selectionStrategy, TimerService timerService, long txPullIntervalMillis, BatchingTxApplier applier, Monitors monitors, StoreCopyProcess storeCopyProcess, System.Func <DatabaseHealth> databaseHealthSupplier, TopologyService topologyService)

        {
            this._localDatabase            = localDatabase;
            this._log                      = logProvider.getLog(this.GetType());
            this._enableDisableOnStoreCopy = enableDisableOnSoreCopy;
            this._catchUpClient            = catchUpClient;
            this._selectionStrategy        = selectionStrategy;
            this._timerService             = timerService;
            this._txPullIntervalMillis     = txPullIntervalMillis;
            this._applier                  = applier;
            this._pullRequestMonitor       = monitors.NewMonitor(typeof(PullRequestMonitor));
            this._storeCopyProcess         = storeCopyProcess;
            this._databaseHealthSupplier   = databaseHealthSupplier;
            this._topologyService          = topologyService;
        }
Ejemplo n.º 5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: void set(Suspendable suspendable) throws Throwable
            internal void Set(Suspendable suspendable)
            {
                _consumer.accept(suspendable);
            }
Ejemplo n.º 6
0
 public virtual void Add(Suspendable suspendable)
 {
     _suspendables.Add(suspendable);
 }