Java 类org.apache.lucene.util.ThrottledIndexOutput 实例源码

项目:search    文件:MockDirectoryWrapper.java   
public MockDirectoryWrapper(Random random, Directory delegate) {
  super(delegate);
  // must make a private random since our methods are
  // called from different threads; else test failures may
  // not be reproducible from the original seed
  this.randomState = new Random(random.nextInt());
  this.throttledOutput = new ThrottledIndexOutput(ThrottledIndexOutput
      .mBitsToBytes(40 + randomState.nextInt(10)), 5 + randomState.nextInt(5), null);
  // force wrapping of lockfactory
  this.lockFactory = new MockLockFactoryWrapper(this, delegate.getLockFactory());
  init();
}
项目:NYBC    文件:MockDirectoryWrapper.java   
public MockDirectoryWrapper(Random random, Directory delegate) {
  super(delegate);
  // must make a private random since our methods are
  // called from different threads; else test failures may
  // not be reproducible from the original seed
  this.randomState = new Random(random.nextInt());
  this.throttledOutput = new ThrottledIndexOutput(ThrottledIndexOutput
      .mBitsToBytes(40 + randomState.nextInt(10)), 5 + randomState.nextInt(5), null);
  // force wrapping of lockfactory
  this.lockFactory = new MockLockFactoryWrapper(this, delegate.getLockFactory());
  init();
}
项目:Maskana-Gestor-de-Conocimiento    文件:MockDirectoryWrapper.java   
public MockDirectoryWrapper(Random random, Directory delegate) {
  super(delegate);
  // must make a private random since our methods are
  // called from different threads; else test failures may
  // not be reproducible from the original seed
  this.randomState = new Random(random.nextInt());
  this.throttledOutput = new ThrottledIndexOutput(ThrottledIndexOutput
      .mBitsToBytes(40 + randomState.nextInt(10)), 5 + randomState.nextInt(5), null);
  // force wrapping of lockfactory
  this.lockFactory = new MockLockFactoryWrapper(this, delegate.getLockFactory());
  init();
}