class ConfigurationStore implements IvoryService {

    public synchronized void publish(EntityType type, Entity entity) throws IvoryException {
        try {
            if (get(type, entity.getName()) == null) {
                persist(type, entity);
                dictionary.get(type).put(entity.getName(), entity);
                onAdd(entity);
            } else {
                throw new EntityAlreadyExistsException(entity.toShortString() + " already registered with configuration store. "
                        + "Can't be submitted again. Try removing before submitting.");
            }
        } catch (IOException e) {
            throw new StoreAccessException(e);
        }
        AUDIT.info(type + "/" + entity.getName() + " is published into config store");
    }

    @SuppressWarnings("unchecked") private  ConfigurationStore();

}