public class RedisJsonDialect extends AbstractRedisDialect implements MultigetGridDialect, GroupingByEntityDialect
Tuples are stored in Redis as a JSON serialization of a Entity object. Associations are stored in Redis obtained as a
JSON serialization of a Association object either within the entity or external.
See DocumentStoreProperties.ASSOCIATIONS_STORE on how to configure
entity or external storage.
| Modifier and Type | Field and Description |
|---|---|
protected JsonEntityStorageStrategy |
entityStorageStrategy |
ASSOCIATIONS, clusterMode, connection, IDENTIFIERS, strategy| Constructor and Description |
|---|
RedisJsonDialect(RedisDatastoreProvider provider) |
addIdToEntity, addKeyValuesFromKeyName, associationId, entityId, getAssociation, getAssociationRow, getEmbeddingEntityTuplePointer, getKeyWithoutTablePrefix, getObjectTTL, identifierId, isClusterMode, keyStringToMap, keyToMap, nextValue, remove, removeAssociations, removeTuple, scan, setObjectTTL, storeAssociation, supportsSequencesexecuteBatch, flushPendingOperations, insertOrUpdateAssociation, insertOrUpdateTuple, removeAssociationgetDuplicateInsertPreventionStrategy, getLockingStrategy, isInTheInsertionQueue, usesNavigationalInformationForInverseSideOfAssociationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteBatch, flushPendingOperationsgetDuplicateInsertPreventionStrategy, getLockingStrategy, insertOrUpdateAssociation, insertOrUpdateTuple, nextValue, removeAssociation, removeTuple, supportsSequences, usesNavigationalInformationForInverseSideOfAssociationsprotected final JsonEntityStorageStrategy entityStorageStrategy
public RedisJsonDialect(RedisDatastoreProvider provider)
public GridType overrideType(org.hibernate.type.Type type)
overrideType in interface GridDialectoverrideType in class BaseGridDialectpublic Tuple getTuple(EntityKey key, OperationContext operationContext)
getTuple in interface GridDialectpublic Tuple createTuple(EntityKey key, OperationContext operationContext)
createTuple in interface GridDialectpublic void executeGroupedChangesToEntity(GroupedChangesToEntityOperation groupedOperation)
executeGroupedChangesToEntity in class AbstractGroupingByEntityDialectpublic boolean isStoredInEntityStructure(AssociationKeyMetadata keyMetadata, AssociationTypeContext associationTypeContext)
isStoredInEntityStructure in interface GridDialectpublic Association getAssociation(AssociationKey key, AssociationContext associationContext)
getAssociation in interface GridDialectpublic Association createAssociation(AssociationKey key, AssociationContext associationContext)
createAssociation in interface GridDialectprotected Object getAssociationRows(Association association, AssociationKey key, AssociationContext associationContext)
Strings, ints etc. in case there is exactly one row key column which is
not part of the association key (in this case we don't need to persist the key name as it can be restored from
the association key upon loading) orEntitys with keys/values for all row key columns which are not part of the association keypublic void forEachTuple(ModelConsumer consumer, TupleTypeContext tupleTypeContext, EntityKeyMetadata entityKeyMetadata)
forEachTuple in interface GridDialectpublic JsonEntityStorageStrategy getEntityStorageStrategy()
public List<Tuple> getTuples(EntityKey[] keys, TupleContext tupleContext)
getTuples in interface MultigetGridDialectCopyright © 2010–2016 Hibernate. All rights reserved.