Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void masterStatementLocks()
        public virtual void MasterStatementLocks()
        {
            StatementLocksFactorySwitcher switcher    = LocksSwitcher;
            StatementLocksFactory         masterLocks = switcher.MasterImpl;

            assertSame(masterLocks, _configuredLockFactory);
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void slaveStatementLocks()
        public virtual void SlaveStatementLocks()
        {
            StatementLocksFactorySwitcher switcher   = LocksSwitcher;
            StatementLocksFactory         slaveLocks = switcher.SlaveImpl;

            assertThat(slaveLocks, instanceOf(typeof(SlaveStatementLocksFactory)));
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void createSlaveStatementLocks()
        public virtual void CreateSlaveStatementLocks()
        {
            StatementLocksFactory @delegate = mock(typeof(StatementLocksFactory));
            Locks  locks  = mock(typeof(Locks));
            Config config = Config.defaults();

            SlaveStatementLocksFactory slaveStatementLocksFactory = new SlaveStatementLocksFactory(@delegate);

            slaveStatementLocksFactory.Initialize(locks, config);
            StatementLocks statementLocks = slaveStatementLocksFactory.NewInstance();

            assertThat(statementLocks, instanceOf(typeof(SlaveStatementLocks)));
            verify(@delegate).initialize(locks, config);
            verify(@delegate).newInstance();
        }
Esempio n. 4
0
 public DefaultEditionModuleDatabaseContext(DefaultEditionModule editionModule, string databaseName)
 {
     this._databaseName             = databaseName;
     this._transactionStartTimeout  = editionModule.TransactionStartTimeout;
     this._schemaWriteGuard         = editionModule.SchemaWriteGuard;
     this._headerInformationFactory = editionModule.HeaderInformationFactory;
     this._commitProcessFactory     = editionModule.CommitProcessFactory;
     this._constraintSemantics      = editionModule.ConstraintSemantics;
     this._ioLimiter             = editionModule.IoLimiter;
     this._accessCapability      = editionModule.AccessCapability;
     this._watcherServiceFactory = editionModule.WatcherServiceFactory;
     this._idContext             = editionModule.IdContextFactory.createIdContext(databaseName);
     this._tokenHolders          = editionModule.TokenHoldersProvider.apply(databaseName);
     this._locks = editionModule.LocksSupplier.get();
     this._statementLocksFactory = editionModule.StatementLocksFactoryProvider.apply(_locks);
     this._transactionMonitor    = editionModule.CreateTransactionMonitor();
     this._editionModule         = editionModule;
 }
Esempio n. 5
0
 public SlaveStatementLocksFactory(StatementLocksFactory @delegate)
 {
     this.@delegate = @delegate;
 }