All Known Implementing Classes:
EventsourcingInstanceRepository, SnapshottingInstanceRepository

public interface InstanceRepository
Responsible for storing instances.
Author:
Johannes Edmeier
  • Method Details

    • save

      reactor.core.publisher.Mono<Instance> save(Instance app)
      Saves the Instance
      Parameters:
      app - instance to save
      Returns:
      the saved instance
    • findAll

      reactor.core.publisher.Flux<Instance> findAll()
      Returns:
      all instances in the repository;
    • find

      reactor.core.publisher.Mono<Instance> find(InstanceId id)
      Parameters:
      id - the instances id
      Returns:
      the instance with the specified id;
    • findByName

      reactor.core.publisher.Flux<Instance> findByName(String name)
      Parameters:
      name - the instances name
      Returns:
      all instance with the specified name;
    • compute

      reactor.core.publisher.Mono<Instance> compute(InstanceId id, BiFunction<InstanceId,Instance,reactor.core.publisher.Mono<Instance>> remappingFunction)
      Updates the instance associated with the id using the remapping function. If there is no associated instance the function will be called with the id and null.
      Parameters:
      id - instance to update
      remappingFunction - function to apply
      Returns:
      the saved istance
    • computeIfPresent

      reactor.core.publisher.Mono<Instance> computeIfPresent(InstanceId id, BiFunction<InstanceId,Instance,reactor.core.publisher.Mono<Instance>> remappingFunction)
      Updates the instance associated with the id using the remapping function. If there is no associated instance the function will not be called.
      Parameters:
      id - instance to update
      remappingFunction - function to apply
      Returns:
      the saved istance