org.apache.tomcat.util.modeler.Registry.getId()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(100)

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

Registry.getId介绍

[英]Return an int ID for faster access. Will be used for notifications and for other operations we want to optimize.
[中]返回一个int-ID以便更快地访问。将用于通知和我们希望优化的其他操作。

代码示例

代码示例来源:origin: jboss.web/jbossweb

private synchronized void registerNotifications( FixedNotificationFilter filter ) {
  String names[]=filter.getNames();
  Registry reg=Registry.getRegistry();
  for( int i=0; i<names.length; i++ ) {
    int code=reg.getId(null, names[i]);
    if( hooks.length < code ) {
      // XXX reallocate
      throw new RuntimeException( "Too many hooks " + code );
    }
    NotificationListener listeners[]=hooks[code];
    if( listeners== null ) {
    }
  }
}

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

private synchronized void registerNotifications( FixedNotificationFilter filter ) {
  String names[]=filter.getNames();
  Registry reg=Registry.getRegistry();
  for( int i=0; i<names.length; i++ ) {
    int code=reg.getId(null, names[i]);
    if( hooks.length < code ) {
      // XXX reallocate
      throw new RuntimeException( "Too many hooks " + code );
    }
    NotificationListener listeners[]=hooks[code];
    if( listeners== null ) {
    }
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

private synchronized void registerNotifications( FixedNotificationFilter filter ) {
  String names[]=filter.getNames();
  Registry reg=Registry.getRegistry();
  for( int i=0; i<names.length; i++ ) {
    int code=reg.getId(null, names[i]);
    if( hooks.length < code ) {
      // XXX reallocate
      throw MESSAGES.tooManyHooks(code);
    }
    NotificationListener listeners[]=hooks[code];
    if( listeners== null ) {
    }
  }
}

相关文章