* @param indexDir {@link Directory} to get the {@link IndexAccessor} for.
* @return {@link IndexAccessor} for the {@link Directory}.
*/
public IndexAccessor getAccessor(final Directory indexDir) throws AlreadyClosedException {
if (wasClosed) {
throw new AlreadyClosedException("IndexAccessorFactory was already closed" + ". Maybe there is a shutdown in progress.");
}
IndexAccessor indexAccessor = indexAccessors.get(indexDir);
if (indexAccessor == null) {
throw new IllegalStateException("Requested Accessor does not exist");
}