Class BuildServersEvent

  • All Implemented Interfaces:
    Event

    public class BuildServersEvent
    extends java.lang.Object
    implements Event
    Called before AjQueue attempts to re-compile its list of QueueServers Use Case: Add/Remove an AdaptedServer from being registered as a QueueServer.
    • Constructor Detail

      • BuildServersEvent

        public BuildServersEvent​(java.util.List<? extends AdaptedServer> servers)
    • Method Detail

      • addServer

        @Nullable
        public @Nullable AdaptedServer addServer​(AdaptedServer server)
        Add a server to be registered as a QueueServer.
        Parameters:
        server - The server to add
        Returns:
        The previous AdaptedServer with that name, or null if there was no previous server
      • removeServer

        public boolean removeServer​(AdaptedServer server)
        Remove a server, preventing it from being registered as a QueueServer.
        Parameters:
        server - The AdaptedServer to remove
        Returns:
        true if the server was removed, false if it was not found
      • removeServer

        public boolean removeServer​(java.lang.String name)
        Remove a server, preventing it from being registered as a QueueServer.
        Parameters:
        name - The name of the server to remove
        Returns:
        true if the server was removed, false if it was not found
      • groupEntrySet

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.util.List<AdaptedServer>>> groupEntrySet()
        Used internally
      • addGroup

        @Nullable
        public @Nullable java.util.List<AdaptedServer> addGroup​(java.lang.String name,
                                                                java.util.List<AdaptedServer> servers)
        Add a server-group to be registered by the Queue Manager.
        Parameters:
        name - The name of the server-group
        servers - The servers to add to the group
        Returns:
        The previous server list with that name, or null if there was no previous data
      • removeGroup

        public boolean removeGroup​(java.lang.String name)
        Remove a server, preventing it from being registered as a QueueServer.
        Parameters:
        name - The name of the server to remove
        Returns:
        true if the server was removed, false if it was not found