Class InMemoryReadRepo<K,​V>

java.lang.Object
io.memoria.jutils.adapter.crud.InMemoryReadRepo<K,​V>
All Implemented Interfaces:
ReadRepo<K,​V>

public class InMemoryReadRepo<K,​V>
extends java.lang.Object
implements ReadRepo<K,​V>
  • Field Summary

    Fields 
    Modifier and Type Field Description
    java.util.Map<K,​V> db  
  • Constructor Summary

    Constructors 
    Constructor Description
    InMemoryReadRepo​(java.util.Map<K,​V> db)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    reactor.core.publisher.Mono<java.lang.Boolean> exists​(K id)  
    reactor.core.publisher.Mono<io.vavr.control.Option<V>> get​(K id)  
    int hashCode()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • db

      public final java.util.Map<K,​V> db
  • Constructor Details

  • Method Details

    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • exists

      public reactor.core.publisher.Mono<java.lang.Boolean> exists​(K id)
      Specified by:
      exists in interface ReadRepo<K,​V>
    • get

      public reactor.core.publisher.Mono<io.vavr.control.Option<V>> get​(K id)
      Specified by:
      get in interface ReadRepo<K,​V>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object