org.hibernate.cache.internal
Class TenantAwareCacheKey

java.lang.Object
  extended by org.hibernate.cache.spi.CacheKey
      extended by org.hibernate.cache.internal.TenantAwareCacheKey
All Implemented Interfaces:
Serializable

public class TenantAwareCacheKey
extends CacheKey

Variation of CacheKey to be used when multi-tenancy is applied. The tenantId field was not simply added to the superclass because of performance considerations: CacheKey instances are have a very high allocation frequency and this field would enlarge the size by 50%.

See Also:
Serialized Form

Constructor Summary
TenantAwareCacheKey(Serializable id, Type type, String entityOrRoleName, SessionFactoryImplementor factory, String tenantId)
           
 
Method Summary
 String getTenantId()
           
 
Methods inherited from class org.hibernate.cache.spi.CacheKey
equals, getKey, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TenantAwareCacheKey

public TenantAwareCacheKey(Serializable id,
                           Type type,
                           String entityOrRoleName,
                           SessionFactoryImplementor factory,
                           String tenantId)
Method Detail

getTenantId

public String getTenantId()
Overrides:
getTenantId in class CacheKey


Copyright © 2001-2014 Red Hat, Inc. All Rights Reserved.