|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.solr.core.DirectoryFactory
org.apache.solr.core.CachingDirectoryFactory
public abstract class CachingDirectoryFactory
A DirectoryFactory impl base class for caching Directory instances
per path. Most DirectoryFactory implementations will want to extend this
class and simply implement DirectoryFactory.create(String).
| Field Summary | |
|---|---|
protected Map<Directory,org.apache.solr.core.CachingDirectoryFactory.CacheValue> |
byDirectoryCache
|
protected Map<String,org.apache.solr.core.CachingDirectoryFactory.CacheValue> |
byPathCache
|
| Constructor Summary | |
|---|---|
CachingDirectoryFactory()
|
|
| Method Summary | |
|---|---|
void |
close()
Close the this and all of the Directories it contains. |
protected abstract Directory |
create(String path)
Creates a new Directory for a given path. |
boolean |
exists(String path)
Returns true if a Directory exists for a given path. |
Directory |
get(String path,
String rawLockType)
Returns the Directory for a given path, using the specified rawLockType. |
Directory |
get(String path,
String rawLockType,
boolean forceNew)
Returns the Directory for a given path, using the specified rawLockType. |
void |
incRef(Directory directory)
Increment the number of references to the given Directory. |
void |
init(org.apache.solr.common.util.NamedList args)
|
void |
release(Directory directory)
Releases the Directory so that it may be closed when it is no longer referenced. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,org.apache.solr.core.CachingDirectoryFactory.CacheValue> byPathCache
protected Map<Directory,org.apache.solr.core.CachingDirectoryFactory.CacheValue> byDirectoryCache
| Constructor Detail |
|---|
public CachingDirectoryFactory()
| Method Detail |
|---|
public void close()
throws IOException
DirectoryFactory
close in interface Closeableclose in class DirectoryFactoryIOException
protected abstract Directory create(String path)
throws IOException
DirectoryFactory
create in class DirectoryFactoryIOExceptionpublic boolean exists(String path)
DirectoryFactory
exists in class DirectoryFactory
public final Directory get(String path,
String rawLockType)
throws IOException
DirectoryFactory
get in class DirectoryFactoryIOException
public final Directory get(String path,
String rawLockType,
boolean forceNew)
throws IOException
DirectoryFactory
get in class DirectoryFactoryIOExceptionpublic void incRef(Directory directory)
DirectoryFactory
incRef in class DirectoryFactorypublic void init(org.apache.solr.common.util.NamedList args)
public void release(Directory directory)
throws IOException
DirectoryFactory
release in class DirectoryFactoryIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||