Package org.hibernate.stat

Examples of org.hibernate.stat.Statistics.clear()


  @Test
  @TestForIssue( jiraKey = "HHH-9231" )
  public void testAddNewOneToManyElementInitFlushLeaveCacheConsistent() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();
    SecondLevelCacheStatistics cStats = stats.getSecondLevelCacheStatistics( Item.class.getName() + ".items" );

    Item item = null;
    Transaction txn = null;
    Session s = null;
View Full Code Here


  @Test
  @TestForIssue( jiraKey = "HHH-9231" )
  public void testAddNewOneToManyElementNoInitFlushLeaveCacheConsistent() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();
    SecondLevelCacheStatistics cStats = stats.getSecondLevelCacheStatistics( Item.class.getName() + ".items" );

    Item item = null;
    Transaction txn = null;
    Session s = null;
View Full Code Here

  }

  @Test
  public void testAddNewOneToManyElementNoInitFlushInitLeaveCacheConsistent() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();
    SecondLevelCacheStatistics cStats = stats.getSecondLevelCacheStatistics( Item.class.getName() + ".items" );

    Item item = null;
    Transaction txn = null;
    Session s = null;
View Full Code Here

  }

  @Test
  public void testAddNewManyToManyPropertyRefNoInitFlushInitLeaveCacheConsistent() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();
    SecondLevelCacheStatistics cStats = stats.getSecondLevelCacheStatistics( Item.class.getName() + ".items" );

    OtherItem otherItem = null;
    Transaction txn = null;
    Session s = null;
View Full Code Here

  }

  @Test
  public void testStaleWritesLeaveCacheConsistent() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();

    VersionedItem item = null;
    Transaction txn = null;
    Session s = null;
View Full Code Here

  @Test
  @TestForIssue( jiraKey = "HHH-5690")
  public void testPersistEntityFlushRollbackNotInEntityCache() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();

    SecondLevelCacheStatistics slcs = stats.getSecondLevelCacheStatistics( Item.class.getName() );

    Item item = null;
    Transaction txn = null;
View Full Code Here

  @Test
  @TestForIssue( jiraKey = "HHH-5690")
  public void testPersistEntityFlushEvictGetRollbackNotInEntityCache() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();
    SecondLevelCacheStatistics slcs = stats.getSecondLevelCacheStatistics( Item.class.getName() );

    Item item = null;
    Transaction txn = null;
    Session s = null;
View Full Code Here

  }

  @Test
  public void testQueryCacheInvalidation() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();

    SecondLevelCacheStatistics slcs = stats.getSecondLevelCacheStatistics( Item.class.getName() );
    sessionFactory().getCache().evictEntityRegion( Item.class.getName() );

    assertEquals(0, slcs.getPutCount());
View Full Code Here

  }

  @Test
  public void testQueryCache() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();

    Session s;
    Item item = new Item( "chris", "Chris's Item" );

    beginTx();
View Full Code Here

  }

  @Test
  public void testQueryCacheHitInSameTransaction() throws Exception {
    Statistics stats = sessionFactory().getStatistics();
    stats.clear();

    Session s = null;
    Item item = new Item( "galder", "Galder's Item" );

    beginTx();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.