List of usage examples for org.apache.lucene.store MockDirectoryWrapper setThrottling
public void setThrottling(Throttling throttling)
From source file:org.elasticsearch.index.store.mock.MockDirectoryHelper.java
License:Apache License
public Directory wrap(Directory dir) { final MockDirectoryWrapper w = new MockDirectoryWrapper(random, dir); w.setRandomIOExceptionRate(randomIOExceptionRate); w.setRandomIOExceptionRateOnOpen(randomIOExceptionRateOnOpen); w.setThrottling(throttle); w.setCheckIndexOnClose(checkIndexOnClose); wrappers.add(w);// w ww. ja v a 2 s. c o m return new FilterDirectory(w) { @Override public Directory getDelegate() { // TODO we should port this FilterDirectory to Lucene return w.getDelegate(); } }; }
From source file:org.elasticsearch.test.store.mock.MockDirectoryHelper.java
License:Apache License
public Directory wrap(Directory dir) { final MockDirectoryWrapper w = new MockDirectoryWrapper(random, dir); w.setRandomIOExceptionRate(randomIOExceptionRate); w.setRandomIOExceptionRateOnOpen(randomIOExceptionRateOnOpen); w.setThrottling(throttle); w.setCheckIndexOnClose(checkIndexOnClose); w.setPreventDoubleWrite(preventDoubleWrite); w.setNoDeleteOpenFile(noDeleteOpenFile); wrappers.add(w);// w w w .j a v a 2 s .c o m return new FilterDirectory(w) { @Override public Directory getDelegate() { // TODO we should port this FilterDirectory to Lucene return w.getDelegate(); } }; }