org.hibernate.stat.Statistics.getConnectCount()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(87)

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

Statistics.getConnectCount介绍

[英]Get the global number of connections asked by the sessions (the actual number of connections used may be much smaller depending whether you use a connection pool or not)
[中]获取会话请求的全局连接数(实际使用的连接数可能会小得多,具体取决于您是否使用连接池)

代码示例

代码示例来源:origin: hibernate/hibernate-orm

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics( getEntityManagerFactory( args ) );
    return Long.valueOf( statistics != null ? statistics.getConnectCount() : 0 );
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getConnectCount() : 0);
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getConnectCount() : 0);
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getConnectCount() : 0);
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getConnectCount() : 0);
  }
};

代码示例来源:origin: gocd/gocd

json.put("QueryCachePutCount", statistics.getQueryCachePutCount());
json.put("FlushCount", statistics.getFlushCount());
json.put("ConnectCount", statistics.getConnectCount());
json.put("SecondLevelCacheHitCount", statistics.getSecondLevelCacheHitCount());
json.put("SecondLevelCacheMissCount", statistics.getSecondLevelCacheMissCount());

代码示例来源:origin: prometheus/client_java

@Override
 public double getValue(Statistics statistics) {
  return statistics.getConnectCount();
 }
}

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * {@inheritDoc}
 * 
 * @see net.sf.ehcache.hibernate.management.api.HibernateStats#getConnectCount()
 */
public long getConnectCount() {
  return getStatistics().getConnectCount();
}

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

/**
 * @see StatisticsServiceMBean#getConnectCount()
 */
public long getConnectCount() {
  return stats.getConnectCount();
}
/**

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

/**
 * @see StatisticsServiceMBean#getConnectCount()
 */
public long getConnectCount() {
  return stats.getConnectCount();
}
/**

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * @see StatisticsServiceMBean#getConnectCount()
 */
public long getConnectCount() {
  return stats.getConnectCount();
}
/**

代码示例来源:origin: hibernate/hibernate

/**
 * @see StatisticsServiceMBean#getConnectCount()
 */
public long getConnectCount() {
  return stats.getConnectCount();
}
/**

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * {@inheritDoc}
 * 
 * @see net.sf.ehcache.hibernate.management.api.HibernateStats#getConnectCount()
 */
public long getConnectCount() {
  return getStatistics().getConnectCount();
}

代码示例来源:origin: org.jboss.as/jboss-as-jpa-hibernate4

@Override
  void handle(final ModelNode response, final String name, ManagementLookup stats, OperationContext context) {
    response.set(stats.getStatistics().getConnectCount());
  }
});

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * {@inheritDoc}
 * 
 * @see net.sf.ehcache.hibernate.management.api.HibernateStats#getConnectCount()
 */
public long getConnectCount() {
  return getStatistics().getConnectCount();
}

代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-1

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getConnectCount() : 0);
  }
};

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getConnectCount() : 0);
  }
};

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5-3

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getConnectCount() : 0);
  }
};

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate4-3

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getConnectCount() : 0);
  }
};

代码示例来源:origin: org.rhq/rhq-enterprise-server

public void start() {
  //stats.clear();
  queryExecutions = -stats.getQueryExecutionCount();
  transations = -stats.getTransactionCount();
  entityLoads = -stats.getEntityLoadCount();
  connects = -stats.getConnectCount();
  time = -System.currentTimeMillis();
}

相关文章

Statistics类方法