Search in sources :

Example 11 with EnvInfo

use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.

the class FunctionsSupportedInfoProviderTest method testGetIndexScanOIDBufferPagesValueType.

/**
	 * Test method for
	 * {@link com.cubrid.common.core.util.CompatibleUtil#getIndexScanOIDBufferPagesValueType(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
	 * .
	 */
public void testGetIndexScanOIDBufferPagesValueType() {
    EnvInfo envInfo = new EnvInfo();
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.2.0.1150)");
    ServerInfo serverInfo = new ServerInfo();
    serverInfo.setConnected(true);
    serverInfo.setEnvInfo(envInfo);
    String value = CompatibleUtil.getIndexScanOIDBufferPagesValueType(serverInfo);
    assertEquals("int(v>=1&&v<=16)", value);
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.3.2.1150)");
    value = CompatibleUtil.getIndexScanOIDBufferPagesValueType(serverInfo);
    assertEquals("float(v>=0.05&&v<=16)", value);
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Example 12 with EnvInfo

use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.

the class FunctionsSupportedInfoProviderTest method testIsSupportJDBCCancel.

/**
	 * Test method for
	 * {@link com.cubrid.common.core.util.CompatibleUtil#isSupportJDBCCancel(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
	 * .
	 */
public void testIsSupportJDBCCancel() {
    EnvInfo envInfo = new EnvInfo();
    ServerInfo serverInfo = new ServerInfo();
    serverInfo.setConnected(true);
    serverInfo.setEnvInfo(envInfo);
    boolean support = CompatibleUtil.isSupportJDBCCancel(serverInfo);
    assertTrue(support);
    support = CompatibleUtil.isSupportJDBCCancel(null);
    assertTrue(support);
    envInfo.setOsInfo(FileUtil.OsInfoType.LINUX.toString());
    support = CompatibleUtil.isSupportJDBCCancel(serverInfo);
    assertTrue(support);
    envInfo.setOsInfo(FileUtil.OsInfoType.NT.toString());
    support = CompatibleUtil.isSupportJDBCCancel(serverInfo);
    assertFalse(support);
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Example 13 with EnvInfo

use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.

the class FunctionsSupportedInfoProviderTest method testIsSupportVerbose.

/**
	 * Test method for
	 * {@link com.cubrid.common.core.util.CompatibleUtil#isSupportVerbose(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
	 * .
	 */
public void testIsSupportVerbose() {
    EnvInfo envInfo = new EnvInfo();
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.2.0.1150)");
    ServerInfo serverInfo = new ServerInfo();
    serverInfo.setConnected(true);
    serverInfo.setEnvInfo(envInfo);
    boolean support = CompatibleUtil.isSupportVerbose(serverInfo);
    assertFalse(support);
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Example 14 with EnvInfo

use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.

the class FunctionsSupportedInfoProviderTest method testIsSupportNewHAParam.

/**
	 * Test method for
	 * {@link com.cubrid.common.core.util.CompatibleUtil#isSupportNewHABrokerParam(ServerInfo)}
	 * .
	 */
public void testIsSupportNewHAParam() {
    EnvInfo envInfo = new EnvInfo();
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.3.0.1150)");
    ServerInfo serverInfo = new ServerInfo();
    serverInfo.setConnected(true);
    serverInfo.setEnvInfo(envInfo);
    boolean support = CompatibleUtil.isSupportNewHABrokerParam(serverInfo);
    assertFalse(support);
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.4.0.1150)");
    envInfo.setOsInfo(FileUtil.OsInfoType.NT.toString());
    support = CompatibleUtil.isSupportNewHABrokerParam(serverInfo);
    assertFalse(support);
    support = CompatibleUtil.isSupportNewHABrokerParam(null);
    assertFalse(support);
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Example 15 with EnvInfo

use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.

the class DBSpaceLabelProvider method loadDbServerData.

public void loadDbServerData() {
    final GetEnvInfoTask getEnvInfoTask = new GetEnvInfoTask(serverInfo);
    TaskJobExecutor taskJobExec = new CommonTaskJobExec(new ITaskExecutorInterceptor() {

        public void completeAll() {
            EnvInfo envInfo = getEnvInfoTask.loadEnvInfo();
            StringBuilder sb = new StringBuilder();
            if (envInfo != null) {
                sb.append(" ").append(Messages.lblHost + serverInfo.getHostAddress() + ":" + serverInfo.getHostMonPort()).append(StringUtil.NEWLINE);
                sb.append(" ").append(Messages.lblDBVersion + envInfo.getServerVersion()).append(StringUtil.NEWLINE);
                sb.append(" ").append(Messages.lblBrokerVersion + envInfo.getBrokerVersion()).append(StringUtil.NEWLINE);
                sb.append(" ").append(Messages.lblCubridPath + envInfo.getRootDir()).append(StringUtil.NEWLINE);
                sb.append(" ").append(Messages.lblDBPath + envInfo.getDatabaseDir()).append(StringUtil.NEWLINE);
            }
            setDbServerData(sb.toString());
            finishedCount++;
            updateToolBar();
        }

        public IStatus postTaskFinished(ITask task) {
            return Status.OK_STATUS;
        }
    });
    taskJobExec.addTask(getEnvInfoTask);
    String serverName = serverInfo.getServerName();
    String jobName = Messages.taskGetServerInfo + serverName;
    JobFamily jobFamily = new JobFamily();
    jobFamily.setServerName(serverName);
    taskJobExec.schedule(jobName, jobFamily, false, Job.SHORT);
}
Also used : TaskJobExecutor(com.cubrid.common.ui.spi.progress.TaskJobExecutor) ITaskExecutorInterceptor(com.cubrid.common.ui.spi.progress.ITaskExecutorInterceptor) ITask(com.cubrid.common.core.task.ITask) IStatus(org.eclipse.core.runtime.IStatus) CommonTaskJobExec(com.cubrid.common.ui.spi.progress.CommonTaskJobExec) JobFamily(com.cubrid.common.ui.spi.progress.JobFamily) GetEnvInfoTask(com.cubrid.cubridmanager.core.common.task.GetEnvInfoTask) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Aggregations

EnvInfo (com.cubrid.cubridmanager.core.common.model.EnvInfo)37 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)29 ITask (com.cubrid.common.core.task.ITask)5 GetEnvInfoTask (com.cubrid.cubridmanager.core.common.task.GetEnvInfoTask)5 ArrayList (java.util.ArrayList)5 Map (java.util.Map)4 BrokerInfos (com.cubrid.cubridmanager.core.broker.model.BrokerInfos)3 GetBrokerConfParameterTask (com.cubrid.cubridmanager.core.broker.task.GetBrokerConfParameterTask)3 ServerType (com.cubrid.cubridmanager.core.common.model.ServerType)3 ServerUserInfo (com.cubrid.cubridmanager.core.common.model.ServerUserInfo)3 CommonQueryTask (com.cubrid.cubridmanager.core.common.task.CommonQueryTask)3 GetCMConfParameterTask (com.cubrid.cubridmanager.core.common.task.GetCMConfParameterTask)3 GetCMUserListTask (com.cubrid.cubridmanager.core.common.task.GetCMUserListTask)3 GetCubridConfParameterTask (com.cubrid.cubridmanager.core.common.task.GetCubridConfParameterTask)3 MonitoringTask (com.cubrid.cubridmanager.core.common.task.MonitoringTask)3 UpdateCMUserTask (com.cubrid.cubridmanager.core.common.task.UpdateCMUserTask)3 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)3 GetDatabaseListTask (com.cubrid.cubridmanager.core.cubrid.database.task.GetDatabaseListTask)3 List (java.util.List)3 IStatus (org.eclipse.core.runtime.IStatus)3