|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.timeindexing.index.TimeIndexDirectory
public class TimeIndexDirectory
This is the TimeIndexDirectory which returns Index objects. It provides a directory of current Indexes, which can be looked up by name or by ID. This is needed in order to shared Indexes between threads.
| Field Summary | |
|---|---|
protected java.util.HashMap |
countTable
The count hashtable. |
protected static TimeIndexDirectory |
directory
|
protected java.util.HashMap |
indexByIDDirectory
The ID directory. |
protected java.util.HashMap |
indexByNameDirectory
The path directory. |
protected java.util.HashMap |
lockMap
|
| Constructor Summary | |
|---|---|
TimeIndexDirectory()
Construct a TimeIndexDirectory |
|
| Method Summary | |
|---|---|
static long |
addHandle(ManagedIndex index)
Add an extra handle on an Index. |
long |
decrementCount(ManagedIndex index)
Decrment the count on an Index. |
static ManagedIndex |
find(ID anID)
Find a Index by ID. |
static ManagedIndex |
find(java.lang.String name)
Find a Index by index name. |
ManagedIndex |
getIndex(ID anID)
Find a Index by ID. |
ManagedIndex |
getIndex(java.lang.String name)
Find a Index by index name. |
long |
incrementCount(ManagedIndex index)
Incrmeent the count on an Index. |
static boolean |
indexGate(java.net.URI indexURI)
Gated access to the index. |
boolean |
isLocked(java.net.URI indexURI)
Is an index locked |
protected static java.util.Set |
listIndexes()
A set of all the index names. |
java.util.Set |
listIndexesByName()
List all the Indexes by name. |
boolean |
lock(java.net.URI indexURI)
Lock an index |
boolean |
lockWait(java.net.URI indexURI)
Wait for an index to be unlocked and ready for action. |
static void |
mem(java.lang.String str)
|
protected boolean |
putIndex(ID id,
ManagedIndex index)
Save an Index by index ID |
protected boolean |
putIndex(java.lang.String name,
ManagedIndex index)
Save an Index by index name. |
long |
registerIndex(ManagedIndex index,
java.lang.String name,
ID anID)
Register an Index using its name and its ID. |
static long |
removeHandle(ManagedIndex index)
Remove a handle on an Index. |
protected boolean |
removeIndex(ID id)
Remove an Index by index ID |
protected boolean |
removeIndex(java.lang.String name)
Remove an Index by index name. |
boolean |
unlock(java.net.URI indexURI)
Unlock an index |
static boolean |
unlockI(java.net.URI indexURI)
Unlock an index |
boolean |
unregisterIndex(ManagedIndex index)
Unregister an Index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final TimeIndexDirectory directory
protected java.util.HashMap indexByIDDirectory
protected java.util.HashMap indexByNameDirectory
protected java.util.HashMap countTable
protected java.util.HashMap lockMap
| Constructor Detail |
|---|
public TimeIndexDirectory()
| Method Detail |
|---|
public boolean lock(java.net.URI indexURI)
public boolean unlock(java.net.URI indexURI)
public boolean isLocked(java.net.URI indexURI)
public boolean lockWait(java.net.URI indexURI)
public ManagedIndex getIndex(java.lang.String name)
protected boolean putIndex(java.lang.String name,
ManagedIndex index)
protected boolean removeIndex(java.lang.String name)
public java.util.Set listIndexesByName()
public ManagedIndex getIndex(ID anID)
protected boolean putIndex(ID id,
ManagedIndex index)
protected boolean removeIndex(ID id)
public long registerIndex(ManagedIndex index,
java.lang.String name,
ID anID)
public boolean unregisterIndex(ManagedIndex index)
public long incrementCount(ManagedIndex index)
public long decrementCount(ManagedIndex index)
public static ManagedIndex find(java.lang.String name)
public static ManagedIndex find(ID anID)
protected static java.util.Set listIndexes()
public static long addHandle(ManagedIndex index)
public static long removeHandle(ManagedIndex index)
public static boolean indexGate(java.net.URI indexURI)
public static boolean unlockI(java.net.URI indexURI)
public static void mem(java.lang.String str)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||