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

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

Introduction

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

Prototype

Object removeObject(Object key);

Source Link

Document

As of 3.3.0 this method is only called during a rollback for any previous value that was missing in the cache.

Usage

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

License:Apache License

@Test
public void shouldRemoveItemOnDemand() {
    Cache cache = newCache();
    cache.putObject(0, 0);//from   w w  w .j  a  va2 s.  com
    assertNotNull(cache.getObject(0));
    cache.removeObject(0);
    assertNull(cache.getObject(0));
}