@Override
 public void removeAssociation(AssociationKey key, AssociationContext associationContext) {
   Cache<AK, Map<RowKey, Map<String, Object>>> cache =
       getCacheManager().getAssociationCache(key.getMetadata());
   AK cacheKey = getKeyProvider().getAssociationCacheKey(key);
   AtomicMapLookup.removeAtomicMap(cache, cacheKey);
 }
 @Override
 public Association getAssociation(AssociationKey key) {
   Cache<AssociationKey, Map<RowKey, Map<String, Object>>> cache =
       provider.getCache(ASSOCIATION_STORE);
   Map<RowKey, Map<String, Object>> atomicMap =
       AtomicMapLookup.getFineGrainedAtomicMap(cache, key, false);
   return atomicMap == null ? null : new Association(new MapAssociationSnapshot(atomicMap));
 }
 @Override
 public Association getAssociation(AssociationKey key, AssociationContext associationContext) {
   Cache<AK, Map<RowKey, Map<String, Object>>> cache =
       getCacheManager().getAssociationCache(key.getMetadata());
   AK cacheKey = getKeyProvider().getAssociationCacheKey(key);
   Map<RowKey, Map<String, Object>> atomicMap =
       AtomicMapLookup.getFineGrainedAtomicMap(cache, cacheKey, false);
   return atomicMap == null ? null : new Association(new MapAssociationSnapshot(atomicMap));
 }
 private Tuple getTupleFromCacheKey(EK cacheKey, Cache<EK, Map<String, Object>> cache) {
   FineGrainedAtomicMap<String, Object> atomicMap =
       AtomicMapLookup.getFineGrainedAtomicMap(cache, cacheKey, false);
   if (atomicMap == null) {
     return null;
   } else {
     return new Tuple(new InfinispanTupleSnapshot(atomicMap), SnapshotType.UPDATE);
   }
 }
 @Override
 public Tuple createTuple(EntityKey key) {
   // TODO we don't verify that it does not yet exist assuming that this has been done before by
   // the calling code
   // should we improve?
   Cache<EntityKey, Map<String, Object>> cache = provider.getCache(ENTITY_STORE);
   FineGrainedAtomicMap<String, Object> atomicMap =
       AtomicMapLookup.getFineGrainedAtomicMap(cache, key, true);
   return new Tuple(new InfinispanTupleSnapshot(atomicMap));
 }
 @Override
 public Tuple createTuple(EntityKey key, OperationContext operationContext) {
   // TODO we don't verify that it does not yet exist assuming that this has been done before by
   // the calling code
   // should we improve?
   Cache<EK, Map<String, Object>> cache = getCacheManager().getEntityCache(key.getMetadata());
   EK cacheKey = getKeyProvider().getEntityCacheKey(key);
   FineGrainedAtomicMap<String, Object> atomicMap =
       AtomicMapLookup.getFineGrainedAtomicMap(cache, cacheKey, true);
   return new Tuple(new InfinispanTupleSnapshot(atomicMap), SnapshotType.INSERT);
 }
 @Override
 public Tuple getTuple(EntityKey key) {
   Cache<EntityKey, Map<String, Object>> cache = provider.getCache(ENTITY_STORE);
   FineGrainedAtomicMap<String, Object> atomicMap =
       AtomicMapLookup.getFineGrainedAtomicMap(cache, key, false);
   if (atomicMap == null) {
     return null;
   } else {
     return new Tuple(new InfinispanTupleSnapshot(atomicMap));
   }
 }
 @Override
 public Association createAssociation(AssociationKey key) {
   // TODO we don't verify that it does not yet exist assuming that this ahs been done before by
   // the calling code
   // should we improve?
   Cache<AssociationKey, Map<RowKey, Map<String, Object>>> cache =
       provider.getCache(ASSOCIATION_STORE);
   Map<RowKey, Map<String, Object>> atomicMap =
       AtomicMapLookup.getFineGrainedAtomicMap(cache, key, true);
   return new Association(new MapAssociationSnapshot(atomicMap));
 }
 @Override
 public Association createAssociation(AssociationKey key, AssociationContext associationContext) {
   // TODO we don't verify that it does not yet exist assuming that this ahs been done before by
   // the calling code
   // should we improve?
   Cache<AK, Map<RowKey, Map<String, Object>>> cache =
       getCacheManager().getAssociationCache(key.getMetadata());
   AK cacheKey = getKeyProvider().getAssociationCacheKey(key);
   Map<RowKey, Map<String, Object>> atomicMap =
       AtomicMapLookup.getFineGrainedAtomicMap(cache, cacheKey, true);
   return new Association(new MapAssociationSnapshot(atomicMap));
 }
 @Override
 public void removeTuple(EntityKey key, TupleContext tupleContext) {
   Cache<EK, Map<String, Object>> cache = getCacheManager().getEntityCache(key.getMetadata());
   EK cacheKey = getKeyProvider().getEntityCacheKey(key);
   AtomicMapLookup.removeAtomicMap(cache, cacheKey);
 }
 @Override
 public void removeAssociation(AssociationKey key) {
   Cache<AssociationKey, Map<RowKey, Map<String, Object>>> cache =
       provider.getCache(ASSOCIATION_STORE);
   AtomicMapLookup.removeAtomicMap(cache, key);
 }
 @Override
 public void removeTuple(EntityKey key) {
   Cache<EntityKey, Map<String, Object>> cache = provider.getCache(ENTITY_STORE);
   AtomicMapLookup.removeAtomicMap(cache, key);
 }