class DatastoreContextIntrospector {

    public synchronized boolean update(final Map<String, Object> properties) {
        currentProperties = null;
        if (properties == null || properties.isEmpty()) {
            return false;
        }

        LOG.debug("In update: properties: {}", properties);

        final ImmutableMap.Builder<String, Object> mapBuilder = ImmutableMap.<String, Object>builder();

        final Builder builder = DatastoreContext.newBuilderFrom(context);

        final String dataStoreTypePrefix = context.getDataStoreName() + '.';

        final List<String> keys = getSortedKeysByDatastoreType(properties.keySet(), dataStoreTypePrefix);

        boolean updated = false;
        for (String key: keys) {
            final Object value = properties.get(key);
            mapBuilder.put(key, value);

            // If the key is prefixed with the data store type, strip it off.
            if (key.startsWith(dataStoreTypePrefix)) {
                key = key.replaceFirst(dataStoreTypePrefix, "");
            }

            if (convertValueAndInvokeSetter(key, value.toString(), builder)) {
                updated = true;
            }
        }

        currentProperties = mapBuilder.build();

        if (updated) {
            context = builder.build();
        }

        return updated;
    }

    public  DatastoreContextIntrospector(final DatastoreContext context,
            final DataStorePropertiesContainer defaultPropsContainer);

}