All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bagri.server.hazelcast.store.system.SchemaCacheStore Maven / Gradle / Ivy

The newest version!
package com.bagri.server.hazelcast.store.system;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.bagri.core.system.Schema;
import com.hazelcast.core.MapStore;

public class SchemaCacheStore extends ConfigCacheStore implements MapStore { 

	@SuppressWarnings("unchecked")
	@Override
	protected Map loadEntities() {
		Map schemas = new HashMap();
		Collection cSchemas = (Collection) cfg.getEntities(Schema.class); 
		for (Schema schema: cSchemas) {
			schemas.put(schema.getName(), schema);
	    }
		return schemas;
	}

	@Override
	protected void storeEntities(Map entities) {
		cfg.setEntities(Schema.class, entities.values());
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy