Class SpallocProperties.CompatibilityProperties

java.lang.Object
uk.ac.manchester.spinnaker.alloc.SpallocProperties.CompatibilityProperties
Enclosing class:
SpallocProperties

public static class SpallocProperties.CompatibilityProperties
extends Object
Settings relating to the v1 spalloc configuration interface.
  • Constructor Details

    • CompatibilityProperties

      public CompatibilityProperties​(@DefaultValue("false") boolean enable, @DefaultValue("0") int threadPoolSize, @DefaultValue("0.0.0.0") String host, @DefaultValue("22244") int port, @DefaultValue("") String serviceUser, @DefaultValue("") String serviceGroup, @DefaultValue("2000ms") Duration receiveTimeout, @DefaultValue("3s") Duration shutdownTimeout, @DefaultValue("1m") Duration notifyWaitTime, @DefaultValue("1m") Duration defaultKeepalive)
      Parameters:
      enable - Whether to turn the spalloc version 1 compatibility service interface on.
      threadPoolSize - The number of threads to use to service the v1 clients. 0 means no limit.
      host - What hostname to run the spalloc v1 compatibility service on.
      port - What TCP port to run the spalloc v1 compatibility service on.
      serviceUser - What user to run jobs submitted through the spalloc v1 compatibility service with. We recommend that this user exists but is disabled (i.e., login using this service identity need not be supported).
      serviceGroup - What group to run jobs submitted through the spalloc v1 compatibility service against. This group needs to exist, and the service user needs to be a member of it, but does not need to have a quota set.
      receiveTimeout - How long to wait for a message to be received. Making this too short makes the service more expensive. Making this too long makes the service difficult to shut down correctly.
      shutdownTimeout - How long to wait for the executor to shut down, maximum.
      notifyWaitTime - How long to pass to the spalloc core to wait for timeouts relating to message notifications (i.e., due to machine or job status changes).
      defaultKeepalive - The default value for the keepalive property of jobs.
  • Method Details

    • isEnable

      public boolean isEnable()
      Returns:
      Whether to turn the spalloc version 1 compatibility service interface on.
    • getThreadPoolSize

      @PositiveOrZero public @javax.validation.constraints.PositiveOrZero int getThreadPoolSize()
      Returns:
      The number of threads to use to service the v1 clients. 0 means no limit (slightly dangerous).
    • getHost

      @NotBlank public @NotBlank String getHost()
      Returns:
      What host address to run the spalloc v1 compatibility service on.
    • getPort

      @TCPPort(ephemeral=false) public @uk.ac.manchester.spinnaker.utils.validation.TCPPort(ephemeral=false) int getPort()
      Returns:
      What TCP port to run the spalloc v1 compatibility service on.
    • getServiceUser

      public String getServiceUser()
      What user to run jobs submitted through the spalloc v1 compatibility service with. We recommend that this user exists but is disabled (i.e., login using this service identity need not be supported).
      Returns:
      What user to run jobs submitted through the spalloc v1 compatibility service with.
    • getServiceGroup

      public String getServiceGroup()
      What group to run jobs submitted through the spalloc v1 compatibility service against. This group needs to exist, and the service user needs to be a member of it, but does not need to have a quota set.
      Returns:
      What group to run jobs submitted through the spalloc v1 compatibility service against.
    • getShutdownTimeout

      @NotNull public @NotNull Duration getShutdownTimeout()
      Returns:
      How long to wait for the executor to shut down, maximum.
    • getReceiveTimeout

      @NotNull public @NotNull Duration getReceiveTimeout()
      Making this too short makes the service more expensive. Making this too long makes the service difficult to shut down correctly. (Failure to receive in this time triggers an exception, but it needs to be fairly frequent or the thread can't be interrupted.)
      Returns:
      How long to wait for a message to be received.
    • getNotifyWaitTime

      @NotNull public @NotNull Duration getNotifyWaitTime()
      Returns:
      How long to pass to the spalloc core to wait for timeouts relating to message notifications (i.e., due to machine or job status changes).
    • getDefaultKeepalive

      @NotNull public @NotNull Duration getDefaultKeepalive()
      Returns:
      The default value for the keepalive property of jobs.