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)
MementoServiceResourceService.put in interface MementoServiceresourceService - the resource service.identifier - the identifier.public CompletionStage<Void> put(Resource resource)
MementoServiceput in interface MementoServiceresource - 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)
MementoServiceget in interface MementoServiceidentifier - the resource identifiertime - the requested timepublic CompletionStage<SortedSet<Instant>> mementos(IRI identifier)
MementoServicemementos in interface MementoServiceidentifier - the resource identifier