/** * Factory method to more easily create an immediate future * * @param <T> the value type * @param value the value that the future should return * @return the new future; never null */ public static <T> ImmediateFuture<T> create( T value ) { return new ImmediateFuture<T>(value); }
case STARTING: return ImmediateFuture.create(Boolean.FALSE);
case STARTING: return ImmediateFuture.create(Boolean.FALSE);
/** * Factory method to more easily create an immediate future * * @param <T> the value type * @param value the value that the future should return * @return the new future; never null */ public static <T> ImmediateFuture<T> create( T value ) { return new ImmediateFuture<T>(value); }
final JcrRepository repository = getRepository(repositoryName); if (repository.getState() == State.RUNNING) { return ImmediateFuture.create(repository);
/** * Factory method to more easily create an immediate future * * @param <T> the value type * @param value the value that the future should return * @return the new future; never null */ public static <T> ImmediateFuture<T> create( T value ) { return new ImmediateFuture<T>(value); }
final JcrRepository repository = getRepository(repositoryName); if (repository.getState() == State.RUNNING) { return ImmediateFuture.create(repository);
protected Future<Boolean> reindexSinceAsync( final JcrWorkspace workspace, final long timestamp ) { ChangeJournal journal = runningState.journal(); assert journal != null; Iterator<NodeKey> changedNodes = journal.changedNodesSince(timestamp); if (!changedNodes.hasNext()) { // there are no nodes which have been changed since the given timestamp return new ImmediateFuture<>(Boolean.FALSE); } return reindexSinceAsync(workspace.getSession().cache().getWorkspace(), getIndexWriter(), changedNodes); }
protected Future<Boolean> reindexSinceAsync( final JcrWorkspace workspace, final long timestamp ) { ChangeJournal journal = runningState.journal(); assert journal != null; Iterator<NodeKey> changedNodes = journal.changedNodesSince(timestamp); if (!changedNodes.hasNext()) { // there are no nodes which have been changed since the given timestamp return new ImmediateFuture<>(Boolean.FALSE); } return reindexSinceAsync(workspace.getSession().cache().getWorkspace(), getIndexWriter(), changedNodes); }
e.getMessage()), e); return new ImmediateFuture<JcrRepository>(repository); } finally { lock.unlock();
e.getMessage()), e); return new ImmediateFuture<JcrRepository>(repository); } finally { lock.unlock();