Example usage for org.apache.ibatis.cache Cache getSize

List of usage examples for org.apache.ibatis.cache Cache getSize

Introduction

In this page you can find the example usage for org.apache.ibatis.cache Cache getSize.

Prototype

int getSize();

Source Link

Document

Optional.

Usage

From source file:org.mybatis.caches.hazelcast.BaseHazelcastTestCase.java

License:Apache License

@Test
public void shouldDemonstrateHowAllObjectsAreKept() {
    Cache cache = newCache();
    for (int i = 0; i < 100000; i++) {
        cache.putObject(i, i);//  www. j a  v a2 s . c  om
        assertEquals(i, cache.getObject(i));
    }
    assertEquals(100000, cache.getSize());
}