Class AbstractSignManagement

    • Nested Class Summary

      • Nested classes/interfaces inherited from class de.dytanic.cloudnet.ext.bridge.ServiceInfoStateWatcher

        de.dytanic.cloudnet.ext.bridge.ServiceInfoStateWatcher.ServiceInfoState
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Set<Sign> signs  
      • Fields inherited from class de.dytanic.cloudnet.ext.bridge.ServiceInfoStateWatcher

        services
    • Field Detail

      • signs

        protected java.util.Set<Sign> signs
    • Constructor Detail

      • AbstractSignManagement

        public AbstractSignManagement()
    • Method Detail

      • getInstance

        @Deprecated
        public static AbstractSignManagement getInstance()
        Deprecated.
        SignManagement should be accessed via the IServicesRegistry
      • updateSignNext

        protected abstract void updateSignNext​(@NotNull
                                               @NotNull Sign sign,
                                               @NotNull
                                               @NotNull SignLayout signLayout,
                                               @Nullable
                                               @Nullable de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)
      • cleanup

        public abstract void cleanup()
        Removes all signs that don't exist anymore
      • runTaskLater

        protected abstract void runTaskLater​(@NotNull
                                             @NotNull java.lang.Runnable runnable,
                                             long delay)
        Runs a task on the main thread of the current application
        Parameters:
        runnable - the task
        delay - the delay the task should have
      • handleUpdate

        protected void handleUpdate()
        Specified by:
        handleUpdate in class de.dytanic.cloudnet.ext.bridge.ServiceInfoStateWatcher
      • shouldWatchService

        protected boolean shouldWatchService​(de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)
        Specified by:
        shouldWatchService in class de.dytanic.cloudnet.ext.bridge.ServiceInfoStateWatcher
      • shouldShowFullServices

        protected boolean shouldShowFullServices()
        Specified by:
        shouldShowFullServices in class de.dytanic.cloudnet.ext.bridge.ServiceInfoStateWatcher
      • handle

        public void handle​(de.dytanic.cloudnet.driver.event.events.channel.ChannelMessageReceiveEvent event)
      • addSign

        public boolean addSign​(@NotNull
                               @NotNull Sign sign)
        Adds a sign to this wrapper instance
        Parameters:
        sign - the sign to add
        Returns:
        if the sign is allowed to exist on this wrapper instance
      • removeSign

        public void removeSign​(@NotNull
                               @NotNull Sign sign)
        Removes a sign from this wrapper instance
        Parameters:
        sign - the sign to remove
      • updateSigns

        public void updateSigns()
      • sendSignAddUpdate

        public void sendSignAddUpdate​(@NotNull
                                      @NotNull Sign sign)
        Adds a sign to the whole cluster and the database
        Parameters:
        sign - the sign to add
      • sendSignRemoveUpdate

        public void sendSignRemoveUpdate​(@NotNull
                                         @NotNull Sign sign)
        Removes a sign from the whole cluster and the database
        Parameters:
        sign - the sign to remove
      • getSignsFromNode

        @Nullable
        public @Nullable java.util.Collection<Sign> getSignsFromNode()
        Returns all signs contained in the CloudNet sign database
        Returns:
        all signs or null, if an error occurred
      • updateSignConfiguration

        public void updateSignConfiguration​(@NotNull
                                            @NotNull SignConfiguration signConfiguration)
        Updates the SignConfiguration in the whole cluster
        Parameters:
        signConfiguration - the new SignConfiguration
      • executeStartingTask

        protected void executeStartingTask()
      • executeSearchingTask

        protected void executeSearchingTask()
      • getIndexes

        public java.util.concurrent.atomic.AtomicInteger[] getIndexes()
      • getSigns

        public java.util.Set<Sign> getSigns()
        Returns a copy of the signs allowed to exist on this wrapper instance Use addSign(Sign) and removeSign(Sign) for local modification
        Returns:
        a copy of the signs