Class FailOverPolicy

java.lang.Object
com.j_spaces.core.cluster.FailOverPolicy
All Implemented Interfaces:
SmartExternalizable, Externalizable, Serializable

public class FailOverPolicy extends Object implements Serializable, SmartExternalizable
Copyright (c) 2010 GigaSpaces Technologies Ltd. All rights reserved The software source code is proprietary and confidential information of GigaSpaces. You may use the software source code solely under the terms and limitations of The license agreement granted to you by GigaSpaces.
See Also:
  • Field Details

  • Constructor Details

    • FailOverPolicy

      public FailOverPolicy()
  • Method Details

    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
      ClassNotFoundException
    • isFailBackEnabled

      public boolean isFailBackEnabled()
    • setFailBackEnabled

      public void setFailBackEnabled(boolean isFailBackEnabled)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • buildElectionGroups

      public void buildElectionGroups(String spaceName)
      Build all the election groups in fail-over group. Election group is a group of spaces that contains the primary space and all of its backup-only members
    • getElectionGroupName

      public String getElectionGroupName()
      Returns:
      the election group of give space
    • setActiveElectionConfig

      public void setActiveElectionConfig(ActiveElectionConfig activeElectConfig)
      Set active election configuration.
    • getActiveElectionConfig

      public ActiveElectionConfig getActiveElectionConfig()
      Returns:
      active election configuration
    • getRecoverableTargets

      public List<SpaceURL> getRecoverableTargets(String memberName)
      Returns a list of URLs or an empty list of primary targets for given member.
      Parameters:
      memberName - member that looks for a list of primary targets.
      Returns:
      a list of URLs or an empty list of primary targets. Never returns null.
    • getElectionGroupMembers

      public List<String> getElectionGroupMembers()
      Get election group members
      Returns:
      list of group members