Class MemoryTwinPublisher

    • Constructor Detail

      • MemoryTwinPublisher

        public MemoryTwinPublisher()
    • Method Detail

      • register

        public <T> TwinPublisher.Session<T> register​(String key,
                                                     Class<T> clazz,
                                                     String location)
                                              throws IOException
        Specified by:
        register in interface TwinPublisher
        Type Parameters:
        T - type of object for replication
        Parameters:
        key - unique key for the object.
        clazz - a class used for serialization.
        location - targeted Minion location for the object, set null for all locations.
        Returns:
        Session which provides updates to object.
        Throws:
        IOException
      • subscribe

        public <T> org.opennms.core.ipc.twin.memory.MemoryTwinPublisher.Subscription<T> subscribe​(String key,
                                                                                                  String location,
                                                                                                  Class<T> clazz,
                                                                                                  java.util.function.Consumer<T> consumer)