Interface IClusterProvider

All Superinterfaces:
IComponent, IComponentProvider, IInitializable, IURIResolver

public interface IClusterProvider extends IComponentProvider
Provider to manage MWS web stack listener configuration, both stand-alone and clustered. Starting from 7.1.1 the API has been simplified and updated to support write-backs. The old ISegment and IClusterRole API is deprecated but still works. The configuration file migration is detected and performed automatically.
  • Field Details

  • Method Details

    • isServerInRole

      boolean isServerInRole(String roleName)
      Checks whether the "current" server is in a given role
      Parameters:
      roleName - the role to check
      Returns:
      true if the current server is in this role
    • getServer

      IServer getServer()
      Returns currently running server information. Never null.
      Returns:
      IServer object for the current server
    • getServers

      List<IServer> getServers()
      Lists all server in the cluster
      Returns:
      list of IServer
    • getServer

      IServer getServer(String serverName)
      Retrieve a specific server instance by its name. Return null if server does not exist
      Parameters:
      serverName - server node name
      Returns:
      server instance or null if not found
    • getPartitions

      List<IPartition> getPartitions()
    • getPartition

      IPartition getPartition(String serverName)
    • getPartition

      IPartition getPartition()
    • getLastPartition

      IPartition getLastPartition()
    • getClusterPartitionProvider

      IClusterPartitionProvider getClusterPartitionProvider()
    • reloadClusterPartitionProvider

      void reloadClusterPartitionProvider() throws Exception
      Throws:
      Exception
    • reloadClusterServers

      void reloadClusterServers() throws PortalException
      updates the cluster server node list with the latest data from cluster.xml
      Throws:
      PortalException
    • isClustered

      boolean isClustered()
      Typically false on first time startup and during upgrade. Other times is true because it is required for platform shared components to receive notifications. If false no JMS notifications are generated.
      Returns:
      whether or not we're running in a cluster or support shared components like Shared Security.
    • getClusterId

      String getClusterId()
      Returns the clusterId from cluster.xml This id is created upon mws initialization It is used for identifying the current cluster within environments where multiple clusters can exist.
      Returns:
      - the unique cluster id
    • isCurrentServer

      boolean isCurrentServer(IServer server)
      Checks wether the supplied IServer instance is the currently running node
      Parameters:
      server - - a Server instance
      Returns:
      - true if the server names of the current server and the supplied one are equal
    • setClustered

      @Deprecated void setClustered(boolean enabled)
      Deprecated.
      - setting clustered to false is not allowed, clustering is automatically determined by the product
      Enables or disables running in a cluster or shared components notifications.
      Parameters:
      enabled -
    • isDeploymentSymmetrical

      boolean isDeploymentSymmetrical()
      Returns whether components deployment symmetrical across the cluster. If symmetrical, then install policy handles distributed component deployment events to propagate any hot-deployment activities to all other cluster nodes that are currently online: - component deploymment - component update - component undeployment If asymmetrical, then components must be deployed, updated and undeployed on each cluster node and there is a possibility for incremental cluster updates, one node at a time. Default value is 'false'
      Returns:
      true if symmetric, false if asymmetric
      Since:
      7.1.2
    • setDeploymentSymmetrical

      void setDeploymentSymmetrical(boolean symmetrical) throws PortalException
      Updates current component deployment mode. The change takes effect right away on this node and after persistConfigFile(boolean) on all other nodes
      Parameters:
      symmetrical - true or false
      Throws:
      PortalException
      Since:
      7.1.2
    • getFrontEndUrl

      URL getFrontEndUrl()
      Returns cluster front end URL. Replacement for ISegment.getFrontEndUrl()
      Since:
      7.1.1
    • setFrontEndUrl

      void setFrontEndUrl(URL frontEndUrl) throws PortalException
      Updates frontEndUrl for the cluster.
      Parameters:
      frontEndUrl - new URL
      Throws:
      PortalException
      Since:
      7.1.1
      See Also:
    • getFrontEndSecurePort

      int getFrontEndSecurePort()
      Returns cluster front end URL secure port, if configured. Otherwise return <= 0.
      Returns:
      Since:
      8.0.1
    • setFrontEndSecurePort

      void setFrontEndSecurePort(int port) throws PortalException
      Updates cluster front end URL secure port
      Throws:
      PortalException
      Since:
      8.0.1
    • getFrontEndSecureUrl

      URL getFrontEndSecureUrl()
      Returns secure cluster front end URL, if configured, otherwise null
      Since:
      8.0.1
    • setJNDIProviderURL

      void setJNDIProviderURL(String jndiProviderUrl) throws PortalException
      Updates cluster's JNDI provider URL to Universal messaging end point URL
      Throws:
      PortalException
      Since:
      9.7
    • getJNDIProviderURL

      String getJNDIProviderURL()
      Returns Universal messaging server's end point URL, if configured, otherwise null
      Since:
      9.7
    • isJMSConnected

      default boolean isJMSConnected()
      Retruns wether or not JMS is connected to the UM Server
      Since:
      10.7
    • reloadJNDIProviderURL

      boolean reloadJNDIProviderURL()
      Reloads Universal messaging server's end point URL, if changed.
      Returns:
      - returns "true" if reloaded URL successfully.Returns "false" if URL has not changed or an error has occurred.
      Since:
      9.12
    • recreateJNDIConnection

      void recreateJNDIConnection() throws InitializationException
      Re-creates the connection to whatever JNDI provider is currently set.
      Throws:
      InitializationException - - if a provider has already been created.
      Since:
      9.12
    • createServer

      IServer createServer()
      Creates new empty server instance but does not add to the server list. This instance can be customized using its properties before it is added to the server list. To add this server need to call #addServer(String)
      Returns:
      Since:
      7.1.1
    • addServer

      void addServer(IServer server) throws PortalException
      Adds previously created server to the cluster. To persist the changes call persistConfigFile(boolean)
      Parameters:
      server - the server to add
      Throws:
      PortalException
      Since:
      7.1.1
    • removeServer

      void removeServer(IServer server) throws PortalException
      Removes server from the cluster configuration. To persist the changes call persistConfigFile(boolean)
      Parameters:
      server - the server to remove
      Throws:
      PortalException
      Since:
      7.1.1
    • validateConfiguration

      void validateConfiguration() throws PortalException
      Validates configuration. Checks singleton roles (SERVERROLE_AUTODEPLOY and SERVERROLE_SEARCH) restrictions, http listeners requirements, etc...
      Throws:
      PortalException
    • persistConfigFile

      void persistConfigFile(boolean makeBackup) throws IOException, PortalException
      Persist current state of the provider to the configuration file being used for loading the configuration
      Parameters:
      makeBackup - whether to create backup file first
      Throws:
      IOException
      PortalException
      Since:
      7.1.1
    • getSegment

      @Deprecated ISegment getSegment()
      Deprecated.
      This API now always returns the same fake 'default' segment instance.
    • getSegments

      Deprecated.
      Always returns a singleton collection for getSegment()
      Returns:
      list of ISegment
    • getSegment

      @Deprecated ISegment getSegment(String segmentName)
      Deprecated.
      Always returns getSegment()
    • getContextPath

      String getContextPath()
      Returns ContextPath from MWS front end url. if configured, otherwise "" e.g. if frontEndUrl is http://localhost:8585/foo. it will return "foo".
      Since:
      9.8
    • setContextPath

      void setContextPath(String contextPath)
      Sets Context Path for MWS
      Since:
      9.8
    • setUseDBJms

      default void setUseDBJms(boolean useDBJms)