Package com.j_spaces.core.cluster
Class FailOverPolicy
java.lang.Object
com.j_spaces.core.cluster.FailOverPolicy
- All Implemented Interfaces:
SmartExternalizable,Externalizable,Serializable
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:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionintFor dynamic clustering - if >0static final intstatic final intstatic final intlong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildElectionGroups(String spaceName) Build all the election groups in fail-over group.Get election group membersgetRecoverableTargets(String memberName) Returns a list of URLs or an empty list of primary targets for given member.booleanvoidvoidsetActiveElectionConfig(ActiveElectionConfig activeElectConfig) Set active election configuration.voidsetFailBackEnabled(boolean isFailBackEnabled) toString()voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.gigaspaces.serialization.SmartExternalizable
enabledSmartExternalizableWithReference
-
Field Details
-
_numberOfBackups
public int _numberOfBackupsFor dynamic clustering - if >0 -
failOverGroupName
-
failOverGroupMembersNames
-
failOverGroupMembersURLs
-
spaceFinderTimeout
public long spaceFinderTimeout -
m_WriteFOPolicy
-
m_ReadFOPolicy
-
m_TakeFOPolicy
-
m_NotifyFOPolicy
-
m_DefaultFOPolicy
-
POLICY_TYPE_FAIL_TO_AVAILABLE
public static final int POLICY_TYPE_FAIL_TO_AVAILABLE- See Also:
-
POLICY_TYPE_FAIL_TO_BACKUP
public static final int POLICY_TYPE_FAIL_TO_BACKUP- See Also:
-
DEFAULT_FAILOVER_SPACE_FINDER_TIMEOUT
public static final int DEFAULT_FAILOVER_SPACE_FINDER_TIMEOUT- See Also:
-
-
Constructor Details
-
FailOverPolicy
public FailOverPolicy()
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
isFailBackEnabled
public boolean isFailBackEnabled() -
setFailBackEnabled
public void setFailBackEnabled(boolean isFailBackEnabled) -
toString
-
buildElectionGroups
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
- Returns:
- the election group of give space
-
setActiveElectionConfig
Set active election configuration. -
getActiveElectionConfig
- Returns:
- active election configuration
-
getRecoverableTargets
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
Get election group members- Returns:
- list of group members
-