Search in sources :

Example 6 with MasterInfo

use of com.cubrid.cubridmanager.core.replication.model.MasterInfo in project cubrid-manager by CUBRID.

the class ReplServerDialog method initialize.

/**
	 * initialize some values
	 */
private void initialize() {
    if (node != null) {
        ReplicationInfo replInfo = (ReplicationInfo) node.getAdapter(ReplicationInfo.class);
        if (replInfo != null && replInfo.getMasterList() != null && replInfo.getMasterList().size() > 0) {
            MasterInfo masterInfo = replInfo.getMasterList().get(0);
            ipText.setText(masterInfo.getMasterIp());
            portText.setText("8001");
            portText.selectAll();
            userNameText.setText("admin");
            passwordText.setText("");
            mdbNameText.setText(masterInfo.getMasterDbName());
            replServerPortText.setText(masterInfo.getReplServerPort());
        }
        portText.addModifyListener(this);
        passwordText.addModifyListener(this);
    }
}
Also used : MasterInfo(com.cubrid.cubridmanager.core.replication.model.MasterInfo) ReplicationInfo(com.cubrid.cubridmanager.core.replication.model.ReplicationInfo)

Example 7 with MasterInfo

use of com.cubrid.cubridmanager.core.replication.model.MasterInfo in project cubrid-manager by CUBRID.

the class ChangeTablesPage method initialize.

/**
	 * initialize some values
	 */
private void initialize() {
    MasterInfo masterInfo = null;
    if (replNode != null) {
        String type = replNode.getType();
        if (CubridNodeType.DATABASE.equals(type)) {
            ReplicationInfo replInfo = (ReplicationInfo) replNode.getAdapter(ReplicationInfo.class);
            masterInfo = replInfo != null && replInfo.getMasterList() != null && replInfo.getMasterList().size() > 0 ? replInfo.getMasterList().get(0) : null;
        }
    }
    if (masterInfo == null) {
        return;
    }
    List<String> replClassList = masterInfo.getReplTableList();
    boolean isReplAll = masterInfo.isReplAllTable();
    selectTableComp.setReplAllTables(isReplAll);
    selectTableComp.setSelectedTableList(replClassList);
}
Also used : MasterInfo(com.cubrid.cubridmanager.core.replication.model.MasterInfo) ReplicationInfo(com.cubrid.cubridmanager.core.replication.model.ReplicationInfo)

Aggregations

MasterInfo (com.cubrid.cubridmanager.core.replication.model.MasterInfo)7 ReplicationInfo (com.cubrid.cubridmanager.core.replication.model.ReplicationInfo)6 SlaveInfo (com.cubrid.cubridmanager.core.replication.model.SlaveInfo)4 DistributorInfo (com.cubrid.cubridmanager.core.replication.model.DistributorInfo)3 ReplicationParamInfo (com.cubrid.cubridmanager.core.replication.model.ReplicationParamInfo)2 CubridDatabase (com.cubrid.common.ui.spi.model.CubridDatabase)1 CubridServer (com.cubrid.common.ui.spi.model.CubridServer)1 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)1 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)1 ServerUserInfo (com.cubrid.cubridmanager.core.common.model.ServerUserInfo)1 TreeNode (com.cubrid.cubridmanager.core.common.socket.TreeNode)1 DbUserInfo (com.cubrid.cubridmanager.core.cubrid.user.model.DbUserInfo)1 CheckDistributorDbTask (com.cubrid.cubridmanager.core.replication.task.CheckDistributorDbTask)1 GetReplAgentStatusTask (com.cubrid.cubridmanager.core.replication.task.GetReplAgentStatusTask)1 GetReplicatedTablesTask (com.cubrid.cubridmanager.core.replication.task.GetReplicatedTablesTask)1 GetReplicationInfoTask (com.cubrid.cubridmanager.core.replication.task.GetReplicationInfoTask)1 GetReplicationParamTask (com.cubrid.cubridmanager.core.replication.task.GetReplicationParamTask)1 Diagram (com.cubrid.cubridmanager.ui.replication.editor.model.Diagram)1 DistributorNode (com.cubrid.cubridmanager.ui.replication.editor.model.DistributorNode)1 HostNode (com.cubrid.cubridmanager.ui.replication.editor.model.HostNode)1