当前位置: 首页>>代码示例>>Java>>正文


Java CliAvailabilityIndicator类代码示例

本文整理汇总了Java中org.springframework.shell.core.annotation.CliAvailabilityIndicator的典型用法代码示例。如果您正苦于以下问题:Java CliAvailabilityIndicator类的具体用法?Java CliAvailabilityIndicator怎么用?Java CliAvailabilityIndicator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CliAvailabilityIndicator类属于org.springframework.shell.core.annotation包,在下文中一共展示了CliAvailabilityIndicator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: arePCJCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
/**
 * Enables commands that are available when the Shell is connected to a Rya Instance that supports PCJ Indexing.
 */
@CliAvailabilityIndicator({
    CREATE_PCJ_CMD,
    DELETE_PCJ_CMD})
public boolean arePCJCommandsAvailable() {
    // The PCJ commands are only available if the Shell is connected to an instance of Rya
    // that is new enough to use the RyaDetailsRepository and is configured to maintain PCJs.
    final ShellState shellState = state.getShellState();
    if(shellState.getConnectionState() == ConnectionState.CONNECTED_TO_INSTANCE) {
        final GetInstanceDetails getInstanceDetails = shellState.getConnectedCommands().get().getGetInstanceDetails();
        final String ryaInstanceName = state.getShellState().getRyaInstanceName().get();
        try {
            final Optional<RyaDetails> instanceDetails = getInstanceDetails.getDetails( ryaInstanceName );
            if(instanceDetails.isPresent()) {
                return instanceDetails.get().getPCJIndexDetails().isEnabled();
            }
        } catch (final RyaClientException e) {
            return false;
        }
    }
    return false;
}
 
开发者ID:apache,项目名称:incubator-rya,代码行数:25,代码来源:RyaAdminCommands.java

示例2: arePeriodicPCJCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
/**
 * Enables commands that are available when the Shell is connected to a Rya Instance that supports PCJ Indexing.
 */
@CliAvailabilityIndicator({
    CREATE_PERIODIC_PCJ_CMD,
    DELETE_PERIODIC_PCJ_CMD,
    LIST_INCREMENTAL_QUERIES})
public boolean arePeriodicPCJCommandsAvailable() {
    // The PCJ commands are only available if the Shell is connected to an instance of Rya
    // that is new enough to use the RyaDetailsRepository and is configured to maintain PCJs.
    final ShellState shellState = state.getShellState();
    if(shellState.getConnectionState() == ConnectionState.CONNECTED_TO_INSTANCE &&
            shellState.getStorageType().get() == StorageType.ACCUMULO) {
        final GetInstanceDetails getInstanceDetails = shellState.getConnectedCommands().get().getGetInstanceDetails();
        final String ryaInstanceName = state.getShellState().getRyaInstanceName().get();
        try {
            final Optional<RyaDetails> instanceDetails = getInstanceDetails.getDetails( ryaInstanceName );
            if(instanceDetails.isPresent()) {
                return instanceDetails.get().getPCJIndexDetails().isEnabled();
            }
        } catch (final RyaClientException e) {
            return false;
        }
    }
    return false;
}
 
开发者ID:apache,项目名称:incubator-rya,代码行数:27,代码来源:RyaAdminCommands.java

示例3: clientCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.LIST_CLIENTS, CliStrings.DESCRIBE_CLIENT})
public boolean clientCommandsAvailable() {
  boolean isAvailable = true; // always available on server
  if (CliUtil.isGfshVM()) { // in gfsh check if connected
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:9,代码来源:ClientCommands.java

示例4: sharedConfigCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.EXPORT_SHARED_CONFIG, CliStrings.IMPORT_SHARED_CONFIG})
public boolean sharedConfigCommandsAvailable() {
  boolean isAvailable = true; // always available on server
  if (CliUtil.isGfshVM()) { // in gfsh check if connected
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:9,代码来源:ExportImportClusterConfigurationCommands.java

示例5: dataCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.REBALANCE, CliStrings.GET, CliStrings.PUT,
    CliStrings.REMOVE, CliStrings.LOCATE_ENTRY, CliStrings.QUERY, CliStrings.IMPORT_DATA,
    CliStrings.EXPORT_DATA})
public boolean dataCommandsAvailable() {
  boolean isAvailable = true; // always available on server
  if (CliUtil.isGfshVM()) { // in gfsh check if connected
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:11,代码来源:DataCommands.java

示例6: functionCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.EXECUTE_FUNCTION, CliStrings.DESTROY_FUNCTION,
    CliStrings.LIST_FUNCTION})
public boolean functionCommandsAvailable() {
  boolean isAvailable = true; // always available on server
  if (CliUtil.isGfshVM()) { // in gfsh check if connected
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:10,代码来源:FunctionCommands.java

示例7: shutdownCommandAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.SHUTDOWN, CliStrings.GC, CliStrings.SHOW_DEADLOCK,
    CliStrings.SHOW_METRICS, CliStrings.SHOW_LOG, CliStrings.EXPORT_STACKTRACE,
    CliStrings.NETSTAT, CliStrings.EXPORT_LOGS, CliStrings.CHANGE_LOGLEVEL})
public boolean shutdownCommandAvailable() {
  boolean isAvailable = true; // always available on server
  if (CliUtil.isGfshVM()) { // in gfsh check if connected
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:11,代码来源:MiscellaneousCommands.java

示例8: isWanCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.CREATE_GATEWAYSENDER, CliStrings.START_GATEWAYSENDER,
    CliStrings.PAUSE_GATEWAYSENDER, CliStrings.RESUME_GATEWAYSENDER,
    CliStrings.STOP_GATEWAYSENDER, CliStrings.CREATE_GATEWAYRECEIVER,
    CliStrings.START_GATEWAYRECEIVER, CliStrings.STOP_GATEWAYRECEIVER, CliStrings.LIST_GATEWAY,
    CliStrings.STATUS_GATEWAYSENDER, CliStrings.STATUS_GATEWAYRECEIVER,
    CliStrings.LOAD_BALANCE_GATEWAYSENDER, CliStrings.DESTROY_GATEWAYSENDER})
public boolean isWanCommandsAvailable() {
  boolean isAvailable = true; // always available on server
  if (CliUtil.isGfshVM()) {
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:14,代码来源:WanCommands.java

示例9: configCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.DESCRIBE_CONFIG, CliStrings.EXPORT_CONFIG,
    CliStrings.ALTER_RUNTIME_CONFIG})
public boolean configCommandsAvailable() {
  boolean isAvailable = true; // always available on server
  if (CliUtil.isGfshVM()) { // in gfsh check if connected
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:10,代码来源:ConfigCommands.java

示例10: isRegionCommandAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.ALTER_REGION, CliStrings.CREATE_REGION,
    CliStrings.DESTROY_REGION})
public boolean isRegionCommandAvailable() {
  boolean isAvailable = true; // always available on server
  if (CliUtil.isGfshVM()) { // in gfsh check if connected //TODO - Abhishek: make this better
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:10,代码来源:CreateAlterDestroyRegionCommands.java

示例11: launcherCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.START_LOCATOR, CliStrings.STOP_LOCATOR,
    CliStrings.STATUS_LOCATOR, CliStrings.START_SERVER, CliStrings.STOP_SERVER,
    CliStrings.STATUS_SERVER, CliStrings.START_MANAGER, CliStrings.START_PULSE,
    CliStrings.START_VSD, CliStrings.START_DATABROWSER})
public boolean launcherCommandsAvailable() {
  return true;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:8,代码来源:LauncherLifecycleCommands.java

示例12: queueCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.CREATE_ASYNC_EVENT_QUEUE,
    CliStrings.LIST_ASYNC_EVENT_QUEUES})
public boolean queueCommandsAvailable() {
  boolean isAvailable = true;
  if (CliUtil.isGfshVM()) {
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:10,代码来源:QueueCommands.java

示例13: isRegionCommandAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.LIST_REGION, CliStrings.DESCRIBE_REGION})
public boolean isRegionCommandAvailable() {
  boolean isAvailable = true; // always available on server
  if (CliUtil.isGfshVM()) { // in gfsh check if connected //TODO - Abhishek: make this better
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:9,代码来源:RegionCommands.java

示例14: durableCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.LIST_DURABLE_CQS, CliStrings.CLOSE_DURABLE_CLIENTS,
    CliStrings.CLOSE_DURABLE_CQS, CliStrings.COUNT_DURABLE_CQ_EVENTS})
public boolean durableCommandsAvailable() {
  boolean isAvailable = true;
  if (CliUtil.isGfshVM()) {
    isAvailable = getGfsh() != null && getGfsh().isConnectedAndReady();
  }
  return isAvailable;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:10,代码来源:DurableClientCommands.java

示例15: diskStoreCommandsAvailable

import org.springframework.shell.core.annotation.CliAvailabilityIndicator; //导入依赖的package包/类
@CliAvailabilityIndicator({CliStrings.BACKUP_DISK_STORE, CliStrings.COMPACT_DISK_STORE,
    CliStrings.DESCRIBE_DISK_STORE, CliStrings.LIST_DISK_STORE,
    CliStrings.REVOKE_MISSING_DISK_STORE, CliStrings.SHOW_MISSING_DISK_STORE,
    CliStrings.CREATE_DISK_STORE, CliStrings.DESTROY_DISK_STORE})
public boolean diskStoreCommandsAvailable() {
  // these disk store commands are always available in GemFire
  return (!CliUtil.isGfshVM() || (getGfsh() != null && getGfsh().isConnectedAndReady()));
}
 
开发者ID:ampool,项目名称:monarch,代码行数:9,代码来源:DiskStoreCommands.java


注:本文中的org.springframework.shell.core.annotation.CliAvailabilityIndicator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。