Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void tearDown()
        public virtual void TearDown()
        {
            if (_idGenerator != null)
            {
                _idGenerator.Dispose();
            }
        }
Ejemplo n.º 2
0
        private IdGenerator OpenGenerator(File file, int grabSize, IdType idType, System.Func <long> highId, long maxId, bool aggressiveReuse)
        {
            ReplicatedIdGenerator other = _generators[idType];

            if (other != null)
            {
                other.Dispose();
            }
            ReplicatedIdGenerator replicatedIdGenerator = new ReplicatedIdGenerator(_fs, file, idType, highId, _idRangeAcquirer, _logProvider, grabSize, aggressiveReuse);

            _generators[idType] = replicatedIdGenerator;
            return(replicatedIdGenerator);
        }