Record InMemoryMsgSenderRepo

java.lang.Object
java.lang.Record
io.memoria.jutils.adapter.messaging.InMemoryMsgSenderRepo
All Implemented Interfaces:
MsgSender, io.vavr.Function1<Message,​reactor.core.publisher.Mono<Response>>, java.io.Serializable, java.util.function.Function<Message,​reactor.core.publisher.Mono<Response>>

public record InMemoryMsgSenderRepo(java.util.Map<java.lang.String,​java.util.HashMap<java.lang.Integer,​java.util.Queue<Message>>> db, MessageFilter mf)
extends java.lang.Record
implements MsgSender
See Also:
Serialized Form
  • Field Summary

    Fields inherited from interface io.vavr.Function1

    serialVersionUID
  • Constructor Summary

    Constructors 
    Constructor Description
    InMemoryMsgSenderRepo​(java.util.Map<java.lang.String,​java.util.HashMap<java.lang.Integer,​java.util.Queue<Message>>> db, MessageFilter mf)
    Creates an instance of a InMemoryMsgSenderRepo record.
  • Method Summary

    Modifier and Type Method Description
    reactor.core.publisher.Mono<Response> apply​(Message msg)  
    java.util.Map<java.lang.String,​java.util.HashMap<java.lang.Integer,​java.util.Queue<Message>>> db()
    Returns the value of the db record component.
    boolean equals​(java.lang.Object o)
    Indicates whether some other object is "equal to" this one.
    int hashCode()
    Returns a hash code value for this object.
    MessageFilter mf()
    Returns the value of the mf record component.
    java.lang.String toString()
    Returns a string representation of this record.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.vavr.Function1

    andThen, arity, compose, curried, isMemoized, memoized, partial, reversed, tupled

    Methods inherited from interface io.memoria.jutils.core.messaging.MsgSender

    apply
  • Constructor Details

    • InMemoryMsgSenderRepo

      public InMemoryMsgSenderRepo​(java.util.Map<java.lang.String,​java.util.HashMap<java.lang.Integer,​java.util.Queue<Message>>> db, MessageFilter mf)
      Creates an instance of a InMemoryMsgSenderRepo record.
      Parameters:
      db - the value for the db record component
      mf - the value for the mf record component
  • Method Details

    • apply

      public reactor.core.publisher.Mono<Response> apply​(Message msg)
      Specified by:
      apply in interface java.util.function.Function<Message,​reactor.core.publisher.Mono<Response>>
      Specified by:
      apply in interface io.vavr.Function1<Message,​reactor.core.publisher.Mono<Response>>
    • toString

      public java.lang.String toString()
      Returns a string representation of this record. The representation contains the name of the type, followed by the name and value of each of the record components.
      Specified by:
      toString in class java.lang.Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class java.lang.Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals​(java.lang.Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class java.lang.Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • db

      public java.util.Map<java.lang.String,​java.util.HashMap<java.lang.Integer,​java.util.Queue<Message>>> db()
      Returns the value of the db record component.
      Returns:
      the value of the db record component
    • mf

      public MessageFilter mf()
      Returns the value of the mf record component.
      Returns:
      the value of the mf record component