| |
|
| java.lang.Object org.apache.lucene.store.Directory org.apache.lucene.store.RAMDirectory org.apache.lucene.store.MockRAMDirectory
MockRAMDirectory | public class MockRAMDirectory extends RAMDirectory (Code) | | This is a subclass of RAMDirectory that adds methods
intented to be used only by unit tests.
version: $Id: RAMDirectory.java 437897 2006-08-29 01:13:10Z yonik $ |
Inner Class :public static class Failure | |
maxUsedSize | long maxUsedSize(Code) | | |
noDeleteOpenFile | boolean noDeleteOpenFile(Code) | | |
randomIOExceptionRate | double randomIOExceptionRate(Code) | | |
MockRAMDirectory | public MockRAMDirectory()(Code) | | |
close | public void close()(Code) | | |
failOn | public synchronized void failOn(Failure fail)(Code) | | add a Failure object to the list of objects to be evaluated
at every potential failure point
|
getMaxSizeInBytes | public long getMaxSizeInBytes()(Code) | | |
getMaxUsedSizeInBytes | public long getMaxUsedSizeInBytes()(Code) | | Returns the peek actual storage used (bytes) in this
directory.
|
getNoDeleteOpenFile | public boolean getNoDeleteOpenFile()(Code) | | |
getRandomIOExceptionRate | public double getRandomIOExceptionRate()(Code) | | |
getRecomputedActualSizeInBytes | final public synchronized long getRecomputedActualSizeInBytes()(Code) | | Like getRecomputedSizeInBytes(), but, uses actual file
lengths rather than buffer allocations (which are
quantized up to nearest
RAMOutputStream.BUFFER_SIZE (now 1024) bytes.
|
getRecomputedSizeInBytes | final public synchronized long getRecomputedSizeInBytes()(Code) | | Provided for testing purposes. Use sizeInBytes() instead.
|
maybeThrowDeterministicException | synchronized void maybeThrowDeterministicException() throws IOException(Code) | | Iterate through the failures list, giving each object a
chance to throw an IOE
|
resetMaxUsedSizeInBytes | public void resetMaxUsedSizeInBytes()(Code) | | |
setMaxSizeInBytes | public void setMaxSizeInBytes(long maxSize)(Code) | | |
setNoDeleteOpenFile | public void setNoDeleteOpenFile(boolean value)(Code) | | Emulate windows whereby deleting an open file is not
allowed (raise IOException).
|
setRandomIOExceptionRate | public void setRandomIOExceptionRate(double rate, long seed)(Code) | | If 0.0, no exceptions will be thrown. Else this should
be a double 0.0 - 1.0. We will randomly throw an
IOException on the first write to an OutputStream based
on this probability.
|
|
|
|