public abstract class AbstractRedisDialect
extends org.hibernate.ogm.dialect.impl.AbstractGroupingByEntityDialect
| Modifier and Type | Field and Description |
|---|---|
static String |
ASSOCIATIONS |
protected boolean |
clusterMode |
protected com.lambdaworks.redis.cluster.api.sync.RedisClusterCommands<String,String> |
connection |
static String |
IDENTIFIERS |
protected JsonSerializationStrategy |
strategy |
| Constructor and Description |
|---|
AbstractRedisDialect(com.lambdaworks.redis.cluster.api.sync.RedisClusterCommands<String,String> connection,
boolean configuredForCluster)
Creates a new
AbstractRedisDialect. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addIdToEntity(Entity entity,
String[] columnNames,
Object[] columnValues) |
protected void |
addKeyValuesFromKeyName(org.hibernate.ogm.model.key.spi.EntityKeyMetadata entityKeyMetadata,
String prefix,
String key,
Entity document) |
protected String |
associationId(org.hibernate.ogm.model.key.spi.AssociationKey key)
Create a String representation of the entity key in the format of
Association:(table name):(columnId). |
String |
entityId(org.hibernate.ogm.model.key.spi.EntityKey key)
Create a String representation of the key in the format of
(table name):(columnId). |
protected Association |
getAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key)
Retrieve association from a Redis List or Redis Set, depending on the association type.
|
protected static Object |
getAssociationRow(org.hibernate.ogm.model.spi.Tuple row,
org.hibernate.ogm.model.key.spi.AssociationKey associationKey) |
protected org.hibernate.ogm.entityentry.impl.TuplePointer |
getEmbeddingEntityTuplePointer(org.hibernate.ogm.model.key.spi.AssociationKey key,
org.hibernate.ogm.dialect.spi.AssociationContext associationContext)
Retrieve entity that contains the association, do not enhance with entity key
|
protected String |
getKeyWithoutTablePrefix(String prefixBytes,
String key) |
protected Long |
getObjectTTL(String objectId,
org.hibernate.ogm.options.spi.OptionsContext optionsContext) |
protected String |
identifierId(org.hibernate.ogm.model.key.spi.IdSourceKey key)
Create a String representation of the identifier key in the format of
Identifiers:(table name):(columnId). |
boolean |
isClusterMode() |
protected Map<String,Object> |
keyStringToMap(org.hibernate.ogm.model.key.spi.EntityKeyMetadata entityKeyMetadata,
String key)
Deconstruct the key name into its components:
Single key: Use the value from the key
Multiple keys: De-serialize the JSON map.
|
protected Map<String,String> |
keyToMap(org.hibernate.ogm.model.key.spi.EntityKeyMetadata entityKeyMetadata,
String key)
Deconstruct the key name into its components:
Single key: Use the value from the key
Multiple keys: De-serialize the JSON map.
|
Number |
nextValue(org.hibernate.ogm.dialect.spi.NextValueRequest request) |
protected void |
remove(org.hibernate.ogm.model.key.spi.EntityKey key) |
protected void |
removeAssociations(List<org.hibernate.ogm.model.key.spi.AssociationKey> keys) |
void |
removeTuple(org.hibernate.ogm.model.key.spi.EntityKey key,
org.hibernate.ogm.dialect.spi.TupleContext tupleContext) |
protected com.lambdaworks.redis.KeyScanCursor<String> |
scan(com.lambdaworks.redis.KeyScanCursor<String> cursor,
com.lambdaworks.redis.ScanArgs scanArgs)
Scan over keys.
|
protected void |
setObjectTTL(String objectId,
Long ttl) |
protected void |
storeAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key,
Association association)
Store an association to a Redis List or Redis Set, depending on the association type.
|
boolean |
supportsSequences() |
executeBatch, executeGroupedChangesToEntity, flushPendingOperations, insertOrUpdateAssociation, insertOrUpdateTuple, removeAssociationgetDuplicateInsertPreventionStrategy, getLockingStrategy, isInTheInsertionQueue, overrideType, usesNavigationalInformationForInverseSideOfAssociationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateAssociation, createTuple, forEachTuple, getAssociation, getDuplicateInsertPreventionStrategy, getLockingStrategy, getTuple, isStoredInEntityStructure, overrideType, usesNavigationalInformationForInverseSideOfAssociationspublic static final String IDENTIFIERS
public static final String ASSOCIATIONS
protected final com.lambdaworks.redis.cluster.api.sync.RedisClusterCommands<String,String> connection
protected final JsonSerializationStrategy strategy
protected final boolean clusterMode
public AbstractRedisDialect(com.lambdaworks.redis.cluster.api.sync.RedisClusterCommands<String,String> connection, boolean configuredForCluster)
AbstractRedisDialect.connection - a Redis connection (A regular Redis connection implements also RedisClusterCommands)configuredForCluster - true if the connection is configured for cluster operations.public Number nextValue(org.hibernate.ogm.dialect.spi.NextValueRequest request)
public boolean supportsSequences()
supportsSequences in interface org.hibernate.ogm.dialect.spi.GridDialectsupportsSequences in class org.hibernate.ogm.dialect.spi.BaseGridDialectprotected String identifierId(org.hibernate.ogm.model.key.spi.IdSourceKey key)
Identifiers:(table name):(columnId).
IDENTIFIERSkey - Key for the identifierpublic void removeTuple(org.hibernate.ogm.model.key.spi.EntityKey key,
org.hibernate.ogm.dialect.spi.TupleContext tupleContext)
protected void addKeyValuesFromKeyName(org.hibernate.ogm.model.key.spi.EntityKeyMetadata entityKeyMetadata,
String prefix,
String key,
Entity document)
protected static Object getAssociationRow(org.hibernate.ogm.model.spi.Tuple row, org.hibernate.ogm.model.key.spi.AssociationKey associationKey)
protected Long getObjectTTL(String objectId, org.hibernate.ogm.options.spi.OptionsContext optionsContext)
protected void removeAssociations(List<org.hibernate.ogm.model.key.spi.AssociationKey> keys)
protected void remove(org.hibernate.ogm.model.key.spi.EntityKey key)
protected Map<String,Object> keyStringToMap(org.hibernate.ogm.model.key.spi.EntityKeyMetadata entityKeyMetadata, String key)
protected void addIdToEntity(Entity entity, String[] columnNames, Object[] columnValues)
protected String associationId(org.hibernate.ogm.model.key.spi.AssociationKey key)
Association:(table name):(columnId).
ASSOCIATIONSkey - Key of the associationpublic String entityId(org.hibernate.ogm.model.key.spi.EntityKey key)
(table name):(columnId).key - Key of the entityprotected Map<String,String> keyToMap(org.hibernate.ogm.model.key.spi.EntityKeyMetadata entityKeyMetadata, String key)
protected Association getAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key)
key - the association keyprotected void storeAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key,
Association association)
key - the association keyassociation - the association documentprotected org.hibernate.ogm.entityentry.impl.TuplePointer getEmbeddingEntityTuplePointer(org.hibernate.ogm.model.key.spi.AssociationKey key,
org.hibernate.ogm.dialect.spi.AssociationContext associationContext)
protected com.lambdaworks.redis.KeyScanCursor<String> scan(com.lambdaworks.redis.KeyScanCursor<String> cursor, com.lambdaworks.redis.ScanArgs scanArgs)
KeyScanCursor instance.cursor - scanArgs - public boolean isClusterMode()
true if the connected Redis node (default connection) is running in Redis Cluster mode.Copyright © 2010–2017 Hibernate. All rights reserved.