|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LuceneConnectionManager
Handle the lifecycle management of a LuceneConnection. These are state machines and they MUST be called in the following order:
init(String, boolean, org.apache.lucene.analysis.Analyzer)
to point to the physical location
get()
shutdown()
isActive()
A LuceneConnectionManager should be threadsafe, in that calls to get()
prior to a
shutdown()
will return a live LuceneConnection, but the manager cannot guarantee
that the connection itself will not be closed during use. Behaviour of the LuceneConnection
itself is unspecified here. As well, Direct calls to the ILuceneConnection.close()
methods will cause unspecified behaviour and should not be made.
Method Summary | |
---|---|
com.atlassian.bonnie.ILuceneConnection |
get()
Get a live LuceneConnection. |
void |
init(String indexPath,
boolean create,
org.apache.lucene.analysis.Analyzer analyzer)
The init parameters for the LuceneConnection. |
boolean |
isActive()
Whether the LuceneConnection has been inited and not shutdown. |
void |
shutdown()
Close the LuceneConnection and discard it. |
Method Detail |
---|
com.atlassian.bonnie.ILuceneConnection get() throws IllegalStateException
shutdown()
.
IllegalStateException
- if isActive()
is falsevoid init(String indexPath, boolean create, org.apache.lucene.analysis.Analyzer analyzer)
isActive()
is false. Subsequent calls once the LuceneConnection
is active are ignored.
boolean isActive()
void shutdown()
get()
should fail, until init(String, boolean, org.apache.lucene.analysis.Analyzer)
is invoked.
Subsequent calls to shutdown are ignored.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |