org.apache.hadoop.ipc.RPC.getSuperInterfaces()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.apache.hadoop.ipc.RPC.getSuperInterfaces方法的一些代码示例,展示了RPC.getSuperInterfaces的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RPC.getSuperInterfaces方法的具体详情如下:
包路径:org.apache.hadoop.ipc.RPC
类名称:RPC
方法名:getSuperInterfaces

RPC.getSuperInterfaces介绍

[英]Get all superInterfaces that extend VersionedProtocol
[中]获取所有扩展VersionedProtocol的超级接口

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-common

/**
 * Get all interfaces that the given protocol implements or extends
 * which are assignable from VersionedProtocol.
 */
static Class<?>[] getProtocolInterfaces(Class<?> protocol) {
 Class<?>[] interfaces  = protocol.getInterfaces();
 return getSuperInterfaces(interfaces);
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

/**
 * Get all superInterfaces that extend VersionedProtocol
 * @param childInterfaces
 * @return the super interfaces that extend VersionedProtocol
 */
static Class<?>[] getSuperInterfaces(Class<?>[] childInterfaces) {
 List<Class<?>> allInterfaces = new ArrayList<Class<?>>();
 for (Class<?> childInterface : childInterfaces) {
  if (VersionedProtocol.class.isAssignableFrom(childInterface)) {
    allInterfaces.add(childInterface);
    allInterfaces.addAll(
      Arrays.asList(
        getSuperInterfaces(childInterface.getInterfaces())));
  } else {
   LOG.warn("Interface " + childInterface +
      " ignored because it does not extend VersionedProtocol");
  }
 }
 return allInterfaces.toArray(new Class[allInterfaces.size()]);
}

代码示例来源:origin: io.hops/hadoop-common

/**
 * Get all interfaces that the given protocol implements or extends
 * which are assignable from VersionedProtocol.
 */
static Class<?>[] getProtocolInterfaces(Class<?> protocol) {
 Class<?>[] interfaces  = protocol.getInterfaces();
 return getSuperInterfaces(interfaces);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

/**
 * Get all interfaces that the given protocol implements or extends
 * which are assignable from VersionedProtocol.
 */
static Class<?>[] getProtocolInterfaces(Class<?> protocol) {
 Class<?>[] interfaces  = protocol.getInterfaces();
 return getSuperInterfaces(interfaces);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

/**
 * Get all interfaces that the given protocol implements or extends
 * which are assignable from VersionedProtocol.
 */
static Class<?>[] getProtocolInterfaces(Class<?> protocol) {
 Class<?>[] interfaces  = protocol.getInterfaces();
 return getSuperInterfaces(interfaces);
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * Get all interfaces that the given protocol implements or extends
 * which are assignable from VersionedProtocol.
 */
static Class<?>[] getProtocolInterfaces(Class<?> protocol) {
 Class<?>[] interfaces  = protocol.getInterfaces();
 return getSuperInterfaces(interfaces);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

/**
 * Get all superInterfaces that extend VersionedProtocol
 * @param childInterfaces
 * @return the super interfaces that extend VersionedProtocol
 */
static Class<?>[] getSuperInterfaces(Class<?>[] childInterfaces) {
 List<Class<?>> allInterfaces = new ArrayList<Class<?>>();
 for (Class<?> childInterface : childInterfaces) {
  if (VersionedProtocol.class.isAssignableFrom(childInterface)) {
    allInterfaces.add(childInterface);
    allInterfaces.addAll(
      Arrays.asList(
        getSuperInterfaces(childInterface.getInterfaces())));
  } else {
   LOG.warn("Interface " + childInterface +
      " ignored because it does not extend VersionedProtocol");
  }
 }
 return allInterfaces.toArray(new Class[allInterfaces.size()]);
}

代码示例来源:origin: io.hops/hadoop-common

/**
 * Get all superInterfaces that extend VersionedProtocol
 * @param childInterfaces
 * @return the super interfaces that extend VersionedProtocol
 */
static Class<?>[] getSuperInterfaces(Class<?>[] childInterfaces) {
 List<Class<?>> allInterfaces = new ArrayList<Class<?>>();
 for (Class<?> childInterface : childInterfaces) {
  if (VersionedProtocol.class.isAssignableFrom(childInterface)) {
    allInterfaces.add(childInterface);
    allInterfaces.addAll(
      Arrays.asList(
        getSuperInterfaces(childInterface.getInterfaces())));
  } else {
   LOG.warn("Interface " + childInterface +
      " ignored because it does not extend VersionedProtocol");
  }
 }
 return allInterfaces.toArray(new Class[allInterfaces.size()]);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

/**
 * Get all superInterfaces that extend VersionedProtocol
 * @param childInterfaces
 * @return the super interfaces that extend VersionedProtocol
 */
static Class<?>[] getSuperInterfaces(Class<?>[] childInterfaces) {
 List<Class<?>> allInterfaces = new ArrayList<Class<?>>();
 for (Class<?> childInterface : childInterfaces) {
  if (VersionedProtocol.class.isAssignableFrom(childInterface)) {
    allInterfaces.add(childInterface);
    allInterfaces.addAll(
      Arrays.asList(
        getSuperInterfaces(childInterface.getInterfaces())));
  } else {
   LOG.warn("Interface " + childInterface +
      " ignored because it does not extend VersionedProtocol");
  }
 }
 return allInterfaces.toArray(new Class[allInterfaces.size()]);
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * Get all superInterfaces that extend VersionedProtocol
 * @param childInterfaces
 * @return the super interfaces that extend VersionedProtocol
 */
static Class<?>[] getSuperInterfaces(Class<?>[] childInterfaces) {
 List<Class<?>> allInterfaces = new ArrayList<Class<?>>();
 for (Class<?> childInterface : childInterfaces) {
  if (VersionedProtocol.class.isAssignableFrom(childInterface)) {
    allInterfaces.add(childInterface);
    allInterfaces.addAll(
      Arrays.asList(
        getSuperInterfaces(childInterface.getInterfaces())));
  } else {
   LOG.warn("Interface " + childInterface +
      " ignored because it does not extend VersionedProtocol");
  }
 }
 return allInterfaces.toArray(new Class[allInterfaces.size()]);
}

相关文章