Class JardisMemory<R,​E>

  • Type Parameters:
    E - event type
    R - response type
    Direct Known Subclasses:
    JardisMemoryDap, JardisMemoryLsp

    public abstract class JardisMemory<R,​E>
    extends JardisEndPoint
    This class creates an instance of jardis in memory. You can use it for test purposes.
    Author:
    lana
    • Constructor Detail

      • JardisMemory

        public JardisMemory​(com.smeup.jardis.core.JardisConfiguration jardisConfiguration)
      • JardisMemory

        public JardisMemory()
    • Method Detail

      • convertJardisResponse

        public abstract com.smeup.jardis.core.commons.JardisResponse<R> convertJardisResponse​(R r)
      • isEvent

        public abstract boolean isEvent​(Object payload)
      • notifyLocker

        public abstract void notifyLocker​(StringBuilder locker)
      • dispatchConsumableMessage

        public boolean dispatchConsumableMessage​(com.smeup.jardis.core.Message message)
        Description copied from class: JardisEndPoint
        Sends a consumable message to all instances of Handler Dispathing is blocked if message is consumed by an Handler
        Specified by:
        dispatchConsumableMessage in class JardisEndPoint
        Parameters:
        message - The message
        Returns:
        true if one Handler consumed the message, false elsewhere
      • dispatchBroadcastMessage

        public void dispatchBroadcastMessage​(com.smeup.jardis.core.Message message)
        Description copied from class: JardisEndPoint
        Send a broadcast message to all instances of Handler
        Specified by:
        dispatchBroadcastMessage in class JardisEndPoint
        Parameters:
        message - The message
      • onChannelEvent

        public void onChannelEvent​(Consumer<E> event)