Java Code Examples for com.hazelcast.core.IMap#destroy()

The following examples show how to use com.hazelcast.core.IMap#destroy() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HazelcastSlidingWindowRequestRateLimiter.java    From ratelimitj with Apache License 2.0 5 votes vote down vote up
@Override
public boolean resetLimit(String key) {
    IMap<Object, Object> map = hz.getMap(key);
    if (map == null || map.isEmpty()) {
        return false;
    }
    map.clear();
    map.destroy();
    return true;
}
 
Example 2
Source File: HazelcastMemoryService.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
@Override
public void destroyCache(String cacheName) {
    if (this.hcInstance != null) {
        IMap hcMap = this.hcInstance.getMap(cacheName);
        if (hcMap != null) {
            hcMap.destroy();
        }
    }
}
 
Example 3
Source File: HazelcastDistributedObjectProvider.java    From attic-stratos with Apache License 2.0 5 votes vote down vote up
/**
 * Remove map from provider
 *
 * @param name
 */
public void removeMap(String name) {
    if (mapsMap.containsKey(name)) {
        if (isClustered()) {
            IMap map = (IMap) mapsMap.get(name);
            mapProvider.removeMap(name);
            map.destroy();
        }
        mapsMap.remove(name);
    }
}
 
Example 4
Source File: HazelcastMemoryService.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
@Override
public void destroyCache(String cacheName) {
    if (this.hcInstance != null) {
        IMap hcMap = this.hcInstance.getMap(cacheName);
        if (hcMap != null) {
            hcMap.destroy();
        }
    }
}