public void insertOrUpdateTuple(EntityKey key, Tuple tuple, TupleContext tupleContext) {
Map<String, Object> entityRecord = ( (MapTupleSnapshot) tuple.getSnapshot() ).getMap();
MapHelpers.applyTupleOpsOnMap( tuple, entityRecord );
final Cache<SerializableEntityKey> entityCache = datastoreProvider.getEntityCache();
entityCache.put( new Element( new SerializableEntityKey( key ), entityRecord ) );
}