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

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

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

Statistics.getSecondLevelCachePutCount介绍

[英]Global number of cacheable entities/collections put in the cache
[中]放入缓存的可缓存实体/集合的全局数量

代码示例

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

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

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

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

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

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

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

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

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

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

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

json.put("SecondLevelCacheHitCount", statistics.getSecondLevelCacheHitCount());
json.put("SecondLevelCacheMissCount", statistics.getSecondLevelCacheMissCount());
json.put("SecondLevelCachePutCount", statistics.getSecondLevelCachePutCount());
json.put("SessionCloseCount", statistics.getSessionCloseCount());
json.put("SessionOpenCount", statistics.getSessionOpenCount());

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

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

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

assertEquals(0L, statistics.getSecondLevelCachePutCount());
assertFalse(sessionFactory.getCache().containsEntity(PurchaseOrder.class, 1L));
assertEquals(0, statistics.getSecondLevelCachePutCount());
assertEquals( 0, statistics.getSecondLevelCachePutCount() );

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

assertEquals( 3, statistics.getSecondLevelCachePutCount() );
assertEquals( 1, sqlStatementInterceptor.getSqlQueries().size() );

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

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

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

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

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

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

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

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

代码示例来源: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().getSecondLevelCachePutCount());
  }
});

代码示例来源: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.getSecondLevelCachePutCount() : 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.getSecondLevelCachePutCount() : 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.getSecondLevelCachePutCount() : 0);
  }
};

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

public void printStats() {
  System.out.println("2lc put count: " + sessionFactory.getStatistics().getSecondLevelCachePutCount());
  System.out.println("2lc hit count: " + sessionFactory.getStatistics().getSecondLevelCacheHitCount());
  System.out.println("2lc miss count: " + sessionFactory.getStatistics().getSecondLevelCacheMissCount());
}

代码示例来源:origin: riotfamily/riot

@Override
protected void populateStats(Statistics stats) throws Exception {
  org.hibernate.stat.Statistics hs = sessionFactory.getStatistics();
  
  stats.add("Query cache hit count", hs.getQueryCacheHitCount());
  stats.add("Query cache miss count", hs.getQueryCacheMissCount());
  stats.add("Query cache put count", hs.getQueryCachePutCount());
  stats.add("2nd level cache hit count" , hs.getSecondLevelCacheHitCount());
  stats.add("2nd level cache miss count", hs.getSecondLevelCacheMissCount());
  stats.add("2nd level cache put count", hs.getSecondLevelCachePutCount());
}

代码示例来源:origin: com.springsource.insight/insight-repo

private void addSecondLevelCacheStats(List<ApplicationStat> res, Statistics stats) {
  addCacheStat(res, "2Cache/total/", stats.getSecondLevelCacheHitCount(), stats.getSecondLevelCacheMissCount(), stats.getSecondLevelCachePutCount());
  
  for (String cacheRegion : stats.getSecondLevelCacheRegionNames()) {
    SecondLevelCacheStatistics cStats = stats.getSecondLevelCacheStatistics(cacheRegion);
    addCacheStat(res, "2Cache/" + cacheRegion + "/", cStats.getHitCount(), cStats.getMissCount(), cStats.getPutCount());
    addStat(res, "2Cache/" + cacheRegion + "/size", cStats.getElementCountInMemory(),
        "onDisk=" + cStats.getElementCountOnDisk() + ", memSize=" + cStats.getSizeInMemory());
  }
}

相关文章

Statistics类方法