public class NoopMementoService extends Object implements MementoService
Constructor and Description |
---|
NoopMementoService() |
Modifier and Type | Method and Description |
---|---|
CompletionStage<Resource> |
get(IRI identifier,
Instant time)
Fetch a Memento resource for the given time.
|
CompletionStage<SortedSet<Instant>> |
mementos(IRI identifier)
Get the times for all of the Mementos of the given resource.
|
CompletionStage<Void> |
put(Resource resource)
Create a new Memento for a resource.
|
CompletionStage<Void> |
put(ResourceService resourceService,
IRI identifier)
Create a new Memento for a resource, retrieved from a
ResourceService . |
public CompletionStage<Void> put(ResourceService resourceService, IRI identifier)
MementoService
ResourceService
.put
in interface MementoService
resourceService
- the resource service.identifier
- the identifier.public CompletionStage<Void> put(Resource resource)
MementoService
put
in interface MementoService
resource
- the resourceCompletionStage
will complete exceptionally and can be handled with
CompletionStage.handle(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>)
, CompletionStage.exceptionally(java.util.function.Function<java.lang.Throwable, ? extends T>)
or similar methods.public CompletionStage<Resource> get(IRI identifier, Instant time)
MementoService
get
in interface MementoService
identifier
- the resource identifiertime
- the requested timepublic CompletionStage<SortedSet<Instant>> mementos(IRI identifier)
MementoService
mementos
in interface MementoService
identifier
- the resource identifier