public class RedisJsonDialect extends AbstractRedisDialect implements MultigetGridDialect
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, createTuple, entityId, expireAssociation, expireEntity, getAssociation, getAssociationRow, getKeyWithoutTablePrefix, getTTL, getTTL, identifierId, isClusterMode, keyStringToMap, keyToMap, nextValue, remove, removeAssociation, removeTuple, scan, setAssociationTTL, setEntityTTL, storeAssociation, supportsSequencesgetDuplicateInsertPreventionStrategy, getLockingStrategyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateTuple, getDuplicateInsertPreventionStrategy, getLockingStrategy, nextValue, removeTuple, supportsSequencesprotected 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, TupleContext tupleContext)
getTuple in interface GridDialectpublic void insertOrUpdateTuple(EntityKey key, Tuple tuple, TupleContext tupleContext)
insertOrUpdateTuple in interface GridDialectpublic 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 GridDialectpublic void insertOrUpdateAssociation(AssociationKey associationKey, Association association, AssociationContext associationContext)
insertOrUpdateAssociation 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 removeAssociation(AssociationKey key, AssociationContext associationContext)
removeAssociation in interface GridDialectpublic void forEachTuple(ModelConsumer consumer, TupleContext tupleContext, 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.