public class ClusterXML extends Object
Constructor and Description |
---|
ClusterXML(Document doc,
String clusterConfigFile)
This constructor should receive a root document object that represent the cluster xml file.
|
ClusterXML(int _totalMembers,
int _backupMembers,
String _clusterSchemaName,
String _clusterName,
String _distCacheConfigName,
String _jmsConfigName,
String _groups)
SEMI-DYNAMIC CLUSTERING ONLY !!! =================================== Constructor- Used when
the cluster is setuped using the SpaceFinder and The cluster_schema etc.
|
ClusterXML(SpaceURL spaceURL,
String clusterConfigUrl,
String spaceName)
This constructor is used for both cases: when cluster parameters are passed viw SpaceFinder
and for the case when cluster URL is passed.
|
ClusterXML(String clusterConfigURLs)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMember(String ownerMemberName,
String targetMemberName,
String targetMemberURL)
Add
targetMember member in the same replication group of
ownerMemberName member and update Cluster XML file. |
static boolean |
calculateOneWayReplicationValue(String replicationMode) |
static String |
calculateReplicationMode(boolean isSyncReplication,
boolean isOneWayReplication) |
static boolean |
calculateSyncReplicationValue(String replicationMode) |
void |
changeMember(String sourceMember,
String targetMember,
String targetMemberURL)
Change member info in replication group and update xml file.
|
ClusterPolicy |
createClusterPolicy(String clusterMemberName)
Creating cluster policy object.
|
ReplicationPolicy.ReplicationPolicyDescription |
createReplDescPolicy(String sourceMemberName,
Element groupMemberNode,
List<String> groupMemList)
Creates replication policy description for every repl group member.
|
StringBuilder |
getClusterConfigDebugOutput() |
String |
getClusterFileURL()
returns current cluster config file.
|
String[] |
getClusterMemberNames()
Return the
String array objects that contain all cluster member names. |
String |
getClusterSchemaName()
Return cluster schema name.
|
static Element |
getFirstMatchElement(Element elem,
String elemName) |
String[] |
getGroupMemberNames()
Return the
String array objects that contain all cluster member names for all
groups. |
static String |
getNodeValueIfExists(Document doc,
String nodeName) |
static String |
getNodeValueIfExists(Element parentNode,
String nodeName) |
static String |
getNodeValueIfExists(Element parentNode,
String nodeName,
String defaultValue) |
Document |
getXMLRootDocument()
return root
Document of parsed XML file. |
boolean |
isGenerateMembersDynamically() |
void |
removeMember(String targetMemberName)
Remove
targetMemberName member from replication group and update Cluster XML
file. |
static boolean |
supportsBackup(String clusterSchema) |
boolean |
useClusterSchema()
Return
true if used cluster schema, otherwise false . |
public static final String CLUSTER_MEMBER_URL_PROTOCOL_PREFIX
public static final String CLUSTER_MEMBER_URL_PROTOCOL_PREFIX_DEF
public static final String CLUSTER_SCHEMA_NAME_TAG
public static final String CLUSTER_SCHEMA_DESCRIPTION_TAG
public static final String CLUSTER_XML_FILE_SUFFIX
public static final String CLUSTER_XML_DYNAMIC_MEMBERS_TAG
public static final String CLUSTER_SCHEMA_XSL_FILE_SUFFIX
public static final String CLUSTER_SCHEMA_NAME_ASYNC_REPLICATED
public static final String CLUSTER_SCHEMA_NAME_ASYNC_REPLICATED_SYNC2BACKUP
public static final String CLUSTER_SCHEMA_NAME_SYNC_REPLICATED
public static final String CLUSTER_SCHEMA_NAME_PRIMARY_BACKUP
public static final String CLUSTER_SCHEMA_NAME_PARTITIONED
public static final String CLUSTER_SCHEMA_NAME_PARTITIONED_SYNC2BACKUP
public static final String CLUSTER_CONFIG_TAG
public static final String GROUP_TAG
public static final String GROUPS_TAG
public static final String GROUPS_MEMBERS
public static final String GROUP_NAME_TAG
public static final String MEMBER_TAG
public static final String PARAM_TAG
public static final String PARAM_NAME_TAG
public static final String PARAM_VALUE_TAG
public static final String MEMBER_NAME_TAG
public static final String MEMBER_URL_TAG
public static final String FAIL_OVER_POLICY_TAG
public static final String FAIL_OVER_FIND_TIMEOUT_TAG
public static final String FAIL_OVER_FAILBACK_TAG
public static final String ACTIVE_ELECTION_TAG
public static final String ACTIVE_ELECTION_RETRY_COUNT_TAG
public static final String ACTIVE_ELECTION_YIELD_TIME_TAG
public static final String ACTIVE_ELECTION_RESOLUTION_TIMEOUT_TAG
public static final String ACTIVE_ELECTION_FD_TAG
public static final String ACTIVE_ELECTION_FD_INVOCATION_DELAY_TAG
public static final String ACTIVE_ELECTION_FD_RETRY_COUNT_TAG
public static final String ACTIVE_ELECTION_FD_RETRY_TIMEOUT_TAG
public static final String FAIL_OVER_BACKUP_MEMBER_TAG
public static final String FAIL_OVER_BACKUP_MEMBERS_TAG
public static final String FAIL_OVER_BACKUP_MEMBERS_ONLY_TAG
public static final String FAIL_OVER_BACKUP_MEMBER_ONLY_TAG
public static final String FAIL_OVER_SOURCE_MEMBER_TAG
public static final String POLICY_TYPE_TAG
public static final String BROADCAST_CONDITION_TAG
public static final String CLUSTER_MEMBERS_TAG
public static final String CLUSTER_NAME_TAG
public static final String MIRROR_SERVICE_TAG
public static final String MIRROR_SERVICE_URL_TAG
public static final String MIRROR_SERVICE_BULK_SIZE_TAG
public static final String MIRROR_SERVICE_INTERVAL_MILLIS_TAG
public static final String MIRROR_SERVICE_INTERVAL_OPERS_TAG
public static final String MIRROR_SERVICE_REDO_LOG_CAPACITY_EXCEEDED_TAG
public static final String MIRROR_SERVICE_REDO_LOG_CAPACITY_TAG
public static final String MIRROR_SERVICE_SUPPORTS_PARTIAL_UPDATE_TAG
public static final String MIRROR_SERVICE_SUPPORTS_CHANGE_TAG
public static final String MIRROR_SERVICE_CHANGE_SUPPORT_NONE_VALUE
public static final String MIRROR_SERVICE_ENABLED_DEFAULT_VALUE
public static final String MIRROR_SERVICE_URL_DEFAULT_VALUE
public static final String MIRROR_SERVICE_BULK_SIZE_DEFAULT_VALUE
public static final String MIRROR_SERVICE_INTERVAL_MILLIS_DEFAULT_VALUE
public static final String MIRROR_SERVICE_INTERVAL_OPERS_DEFAULT_VALUE
public static final String PROXY_BROADCAST_THREADPOOL_MIN_SIZE_DEFAULT_VALUE
public static final String PROXY_BROADCAST_THREADPOOL_MAX_SIZE_DEFAULT_VALUE
public static final String CACHE_LOADER_TAG
public static final String CACHE_LOADER_EXTERNAL_DATA_SOURCE
public static final String CACHE_LOADER_CENTRAL_DATA_SOURCE
public static final String CACHE_LOADER_EXTERNAL_DATA_SOURCE_DEFAULT_VALUE
public static final String CACHE_LOADER_CENTRAL_DATA_SOURCE_DEFAULT_VALUE
public static final String ASYNC_REPLICATION_TAG
public static final String REPL_POLICY_TAG
public static final String REPL_SYNC_ON_COMMIT_TAG
public static final String REPL_SYNC_ON_COMMIT_TIMEOUT_TAG
public static final String REPL_NOTIFY_TEMPLATE_TAG
public static final String REPL_TRIGGER_NOTIFY_TEMPLATES_TAG
public static final String REPL_LEASE_EXPIRATIONS_TAG
public static final String REPL_CHUNK_SIZE_TAG
public static final String REPL_INTERVAL_MILLIS_TAG
public static final String REPL_INTERVAL_OPERS_TAG
public static final String REPL_FIND_TIMEOUT_TAG
public static final String REPL_FIND_REPORT_INTERVAL_TAG
public static final String REPL_MEMORY_RECOVERY_TAG
public static final String REPL_ORIGINAL_STATE_TAG
public static final String REPL_REDO_LOG_CAPACITY_TAG
public static final String REPL_REDO_LOG_MEMORY_CAPACITY_TAG
public static final String REPL_REDO_LOG_COMPACTION_TAG
public static final String REPL_REDO_LOG_BACKLOG_WEIGHT_POLICY
public static final String REPL_REDO_LOG_RECOVERY_CAPACITY_TAG
public static final String REPL_REDO_LOG_LOCALVIEW_CAPACITY_TAG
public static final String REPL_REDO_LOG_LOCALVIEW_RECOVERY_CAPACITY_TAG
public static final String REPL_REDO_LOG_DURABLE_NOTIFICATION_CAPACITY_TAG
public static final String REPL_LOCALVIEW_MAX_DISCONNECTION_TIME_TAG
public static final String REPL_DURABLE_NOTIFICATION_MAX_DISCONNECTION_TIME_TAG
public static final String REPL_REDO_LOG_CAPACITY_EXCEEDED_TAG
public static final String REPL_TOLERATE_MISSING_PACKETS_TAG
public static final String REPL_ON_CONFLICTING_PACKETS_TAG
public static final String REPL_FULL_TAKE_TAG
public static final String RECOVERY_CHUNK_SIZE_TAG
public static final String RECOVERY_THREAD_POOL_SIZE
public static final String REPL_ONE_PHASE_COMMIT_TAG
public static final String CONNECTION_MONITOR_THREAD_POOL_SIZE
public static final String RELIABLE_ASYNC_REPL_TAG
public static final String RELIABLE_ASYNC_STATE_NOTIFY_INTERVAL_TAG
public static final String RELIABLE_ASYNC_STATE_NOTIFY_PACKETS_TAG
public static final String REPL_ASYNC_CHANNEL_SHUTDOWN_TIMEOUT_TAG
public static final String REPL_FIND_REPORT_INTERVAL_DEFAULT_VALUE
public static final String REPL_REDO_LOG_CAPACITY_DEFAULT_VALUE
public static final String RECOVERY_CHUNK_SIZE_DEFAULT_VALUE
public static final String RECOVERY_THREAD_POOL_SIZE_DEFAULT_VALUE
public static final String REPL_PESRISTENT_BLOBSTORE_REDO_LOG_CAPACITY_DEFAULT_VALUE
public static final String REPL_PESRISTENT_BLOBSTORE_MEMORY_REDO_LOG_CAPACITY_DEFAULT_VALUE
public static final String REPL_TRANSMISSION_TAG
public static final String REPL_DISABLE_TRANSMISSION_TAG
public static final String REPL_TARGET_MEMBER_TAG
public static final String REPL_TRANSMISSION_OPERATIONS_TAG
public static final String[] REPL_TRANSMISSION_OPERATIONS
public static final String REPL_FILTERS_TAG
public static final String REPL_INPUT_FILTER_CLASSNAME_TAG
public static final String REPL_INPUT_FILTER_PARAM_URL_TAG
public static final String REPL_OUTPUT_FILTER_CLASSNAME_TAG
public static final String REPL_OUTPUT_FILTER_PARAM_URL_TAG
public static final String REPL_ACTIVE_WHEN_BACKUP_TAG
public static final String REPL_SHUTDOWN_SPACE_ON_INIT_FAILURE_TAG
public static final String REPL_ACTIVE_WHEN_BACKUP_DEFAULT
public static final String REPL_SHUTDOWN_SPACE_ON_INIT_FAILURE_DEFAULT
public static final String REPL_MEMBER_RECOVERY_TAG
public static final String ENABLED_TAG
public static final String REPL_SOURCE_MEMBER_URL_TAG
public static final String LOAD_BAL_TAG
public static final String APPLY_OWNERSHIP_TAG
public static final String DISABLE_PARALLEL_SCATTERING_TAG
public static final String PROXY_BROADCAST_THREADPOOL_MIN_SIZE_TAG
public static final String PROXY_BROADCAST_THREADPOOL_MAX_SIZE_TAG
public static final String NOTIFY_RECOVERY_TAG
public static final String NOTIFY_RECOVERY_DEFAULT_VALUE
public static final String WRITE_TAG
public static final String READ_TAG
public static final String TAKE_TAG
public static final String NOTIFY_TAG
public static final String DEFAULT_TAG
public static final String REPL_RECEIVER_ACK_POSTFIX
public static final String REPLICATION_MODE_TAG
public static final String PERMITTED_OPERATIONS_TAG
public static final String COMMUNICATION_MODE_TAG
public static final String SYNC_REPL_UNICAST_TAG
public static final String SYNC_REPL_MULTICAST_TAG
public static final String SYNC_REPLICATION_TAG
public static final String MIN_WORK_THREADS_TAG
public static final String MAX_WORK_THREADS_TAG
public static final String TODO_QUEUE_TIMEOUT_TAG
public static final String HOLD_TXN_LOCK_TAG
public static final String MULTIPLE_OPERS_CHUNK_SIZE
public static final String THROTTLE_WHEN_INACTIVE_TAG
public static final String MAX_THROTTLE_TP_WHEN_INACTIVE_TAG
public static final String MIN_THROTTLE_WHEN_INACTIVE_TAG
public static final String TARGET_CONSUME_TIMEOUT_TAG
public static final String CONSISTENCY_LEVEL_TAG
public static final String REPLICATION_PROCESSING_TYPE
public static final String REPLICATION_MULTI_BUCKET_CONFIG
public static final String REPLICATION_MULTI_BUCKET_COUNT
public static final String REPLICATION_MULTI_BUCKET_BATCH_PARALLEL_FACTOR
public static final String REPLICATION_MULTI_BUCKET_BATCH_PARALLEL_THRESHOLD
public static final String SWAP_REDOLOG_CONFIG
public static final String SWAP_REDOLOG_FLUSH_BUFFER_PACKET_COUNT
public static final String SWAP_REDOLOG_FETCH_BUFFER_PACKET_COUNT
public static final String SWAP_REDOLOG_SEGMENT_SIZE
public static final String SWAP_REDOLOG_MAX_SCAN_LENGTH
public static final String SWAP_REDOLOG_MAX_OPEN_CURSORS
public static final String SWAP_REDOLOG_WRITER_BUFFER_SIZE
public static final String IP_GROUP_TAG
public static final String PORT_TAG
public static final String TTL_TAG
public static final String TTL_DEFAULT_VALUE
public static final String ADAPTIVE_MULTICAST_TAG
public static final String HOLD_TXN_LOCK_DEFAULT_VALUE
public static final String FAIL_IN_GROUP
public static final String FAIL_TO_BACKUP
public static final String FAIL_TO_ALTERNATE
public static final String FULL_REPLICATION
public static final String PARTIAL_REPLICATION
public static final String[] FAIL_OVER_POLICIES
public static final String DCACHE_TAG
public static final String DCACHE_CONFIG_NAME_TAG
public static final String JMS_TAG
public static final String JMS_CONFIG_NAME_TAG
public static final String FIRST_AVAILABLE_MEMBER
public static final String BC_BROADCAST_IF_NULL_VALUES
public static final String BC_BROADCAST_UNCONDITIONAL
public static final String BC_BROADCAST_DISABLED
public static final String BC_BROADCAST_IF_ROUTING_INDEX_IS_NULL
public static final String BC_BROADCAST_ALWAYS
public static final String BC_BROADCAST_NEVER
public static final String[] BROADCAST_CONDITIONS_ARRAY
public ClusterXML(SpaceURL spaceURL, String clusterConfigUrl, String spaceName) throws IOException, SAXException, ParserConfigurationException, CreateException
public ClusterXML(int _totalMembers, int _backupMembers, String _clusterSchemaName, String _clusterName, String _distCacheConfigName, String _jmsConfigName, String _groups) throws IOException, SAXException, ParserConfigurationException, CreateException
_totalMembers
- stands for the SpaceURL primary instances part of the
?total_numbers option_backupMembers
- stands for the SpaceURL backups part of the ?total_numbers option,
total_members={number of primary instances, number of backup
instances per primary} In this example the value is 4,2 which means
that this cluster contains up to 4 primary instances each
containing 2 backup instances._clusterSchemaName
- stands for the SpaceURL ?cluster_schema option_clusterName
- stands for the SpaceURL space/container ?schema optionIOException
SAXException
ParserConfigurationException
CreateException
com.j_spaces.kernel.JSpaceUtilities.buildClusterXMLDom()
public ClusterXML(String clusterConfigURLs) throws IOException, SAXException, ParserConfigurationException, CreateException
clusterConfigURLs
- The URLs is a (white space separated) list of URLs that indicate the
location of the cluster configuration file.IOException
SAXException
ParserConfigurationException
CreateException
public boolean useClusterSchema()
true
if used cluster schema, otherwise false
.public boolean isGenerateMembersDynamically()
public String getClusterSchemaName()
String
value, otherwise null
public String[] getClusterMemberNames()
String
array objects that contain all cluster member names.public String[] getGroupMemberNames()
String
array objects that contain all cluster member names for all
groups.public ClusterPolicy createClusterPolicy(String clusterMemberName) throws CreateException
clusterMemberName
- Cluster member name for creatingCreateException
public static String getNodeValueIfExists(Element parentNode, String nodeName, String defaultValue)
public static boolean calculateOneWayReplicationValue(String replicationMode)
public static boolean calculateSyncReplicationValue(String replicationMode)
public static String calculateReplicationMode(boolean isSyncReplication, boolean isOneWayReplication)
public ReplicationPolicy.ReplicationPolicyDescription createReplDescPolicy(String sourceMemberName, Element groupMemberNode, List<String> groupMemList) throws CreateException
sourceMemberName
- Name of member for which creating ReplicationPolicyDescriptiongroupMemberNode
- Member XML ElementCreateException
public Document getXMLRootDocument()
Document
of parsed XML file.public String getClusterFileURL()
public void addMember(String ownerMemberName, String targetMemberName, String targetMemberURL) throws ClusterException
targetMember
member in the same replication group of
ownerMemberName
member and update Cluster XML file.ownerMemberName
- The owner member.targetMemberName
- The target member to add.targetMemberURL
- The target member URL.ClusterException
- Throws if ownderMemberName
not found in no replication
group, or failed to update cluster xml file.public void removeMember(String targetMemberName) throws ClusterException
targetMemberName
member from replication group and update Cluster XML
file.targetMemberName
- The member to remove from XML file.ClusterException
- Throws if the targetMemberName
not found in no
replication group or failed to update Cluster XML file.public void changeMember(String sourceMember, String targetMember, String targetMemberURL) throws ClusterException
sourceMember
- Source member name.targetMember
- Target nametargetMemberURL
- Target URLClusterException
- Throws if sourceMember
not found in XML file.addMember(String, String, String)
,
removeMember(String)
public StringBuilder getClusterConfigDebugOutput()
public static boolean supportsBackup(String clusterSchema)
Copyright © GigaSpaces.