class DistributedMapCacheLookupService extends AbstractControllerService implements StringLookupService {

    @Override
    public Optional<String> lookup(final Map<String, Object> coordinates) {
        if (coordinates == null) {
            return Optional.empty();
        }

        final String key = coordinates.get(KEY).toString();
        if (key == null) {
            return Optional.empty();
        }

        try {
            return Optional.ofNullable(cache.get(key, keySerializer, valueDeserializer));
        } catch (IOException e) {
            getLogger().error("Error while trying to get the value from distributed map cache with key = " + key, e);
            return Optional.empty();
        }
    }

}