blob: 7c01320f3d0d4cf97903278f204b8bce1f7dec66 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.model.api;
import java.time.Instant;
import java.util.Optional;
/**
* Status of reindexing for the documents of an application.
*
* @author jonmv
*/
public interface Reindexing {
/** Reindexing status for this application, for a given cluster and document type. */
default Optional<Status> status(String cluster, String documentType) { return Optional.empty(); }
/** Returns whether reindexing should run for this application. */
default boolean enabled() { return false; }
/** Reindexing status of a given document type in a given cluster in a given application. */
interface Status {
/** The instant at which reindexing may begin. */
Instant ready();
}
Reindexing DISABLED_INSTANCE = new Reindexing() {};
}
|