Java 类com.hazelcast.core.MapStore 实例源码

项目:bigstreams    文件:HazelcastStartupService.java   
/**
 * The distributed map for DistributedMapNames.MAP.FILE_TRACKER_MAP needs to
 * be added to the MapStoreConfig.
 * 
 * @param mapStore
 */
public <T, B> HazelcastStartupService(Configuration conf,
        MapStore<T, B> mapStore) {
    super();
    this.conf = conf;
    this.mapStore = mapStore;
}
项目:hazelcast-mapstore-postgres-cassandra    文件:MyHazelcastInstance.java   
public MyHazelcastInstance(final MapStore store, final String storeType) {
  this.store = store;
  this.storeType = storeType;
  log.info("Creating Hazelcast CEP instance..");
  instanceName = UUID.randomUUID().toString();
  Hazelcast.newHazelcastInstance(getConfig());
  log.info("Created CEP instance.");
}
项目:bagri    文件:PopulationManagementImpl.java   
public MapStore getMapStore(String mapName) {
    MapService svc = nodeEngine.getService(MapService.SERVICE_NAME);
    MapContainer mc = svc.getMapServiceContext().getMapContainer(mapName);
    if (mc != null) {
        MapStoreContext msc = mc.getMapStoreContext();
        if (msc != null) {
            MapStoreWrapper msw = msc.getMapStoreWrapper();
            if (msw != null) {
                return msw.getMapStore();
            }
        }
    }
    return null;
}
项目:hazelcast-simulator    文件:MapStoreUtils.java   
public static void assertMapStoreConfiguration(Logger logger, HazelcastInstance instance, String mapName,
                                               Class<? extends MapStore> mapStoreImplementation) {
    if (isClient(instance)) {
        return;
    }
    String expectedMapStoreName = mapStoreImplementation.getName();
    MapStoreConfig mapStoreConfig = instance.getConfig().getMapConfig(mapName).getMapStoreConfig();
    assertMapStoreConfig(expectedMapStoreName, mapName, mapStoreConfig, logger);
    assertMapStoreClassName(expectedMapStoreName, mapName, mapStoreConfig);
    assertMapStoreImplementation(expectedMapStoreName, mapName, mapStoreConfig, mapStoreImplementation);
}
项目:hazelcast-simulator    文件:MapStoreUtils.java   
private static void assertMapStoreImplementation(String expectedMapStoreName, String mapName, MapStoreConfig mapStoreConfig,
                                                 Class<? extends MapStore> mapStoreImplementation) {
    Object configuredMapStoreImpl = mapStoreConfig.getImplementation();
    if (configuredMapStoreImpl == null) {
        if (mapStoreConfig.getInitialLoadMode().equals(LAZY)) {
            return;
        }
        throw new TestException("MapStore for map %s needs to be initialized with class %s, but was null (%s)", mapName,
                expectedMapStoreName, mapStoreConfig);
    }
    if (!configuredMapStoreImpl.getClass().equals(mapStoreImplementation)) {
        throw new TestException("MapStore for map %s needs to be initialized with class %s, but was %s (%s)", mapName,
                expectedMapStoreName, configuredMapStoreImpl.getClass().getName(), mapStoreConfig);
    }
}
项目:reactive-data    文件:HazelcastClusterServiceBean.java   
/**
 * Set map store using a spring bean. This is for programmatic configuration of {@linkplain MapStore}
 * @param backingStore
 */
public void setMapStoreImplementation(String map, MapStore<? extends Serializable, ? extends Serializable> backingStore)
{
  hzInstance.setMapStoreImplementation(map, backingStore, true);
  log.info("Set write through backing store for saving ensemble models..");
}