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 |
|
-
-
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
-
public final java.util.Map<K,V> db
-
Constructor Details
-
public InMemoryReadRepo(
java.util.Map<K,V> db)
-
Method Details
-
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
-
public reactor.core.publisher.Mono<java.lang.Boolean> exists(
K id)
- Specified by:
exists in interface ReadRepo<K,V>
-
public reactor.core.publisher.Mono<io.vavr.control.Option<V>> get(
K id)
- Specified by:
get in interface ReadRepo<K,V>
-
public int hashCode()
- Overrides:
hashCode in class java.lang.Object