Package org.opencms.db
Class CmsDriverManager.ResourceOUCacheKey
- java.lang.Object
-
- org.opencms.db.CmsDriverManager.ResourceOUCacheKey
-
- Enclosing class:
- CmsDriverManager
public static class CmsDriverManager.ResourceOUCacheKey extends java.lang.Object
Special key class for caching the resource OU data with a Guava LoadingCache.In principle, the actual cache key is just the current project, but because of how cache loaders work, the key must contain everything that varies between calls and is required to load the value. So we also store the DB context for use by the cache loader. The project (offline/online) must still be stored, because the DB context gets invalidated eventually, i.e. its project id gets nulled.
-
-
Constructor Summary
Constructors Constructor Description ResourceOUCacheKey(CmsDriverManager driverManager, CmsDbContext dbc)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
CmsDbContext
getDbContext()
Gets the stored DB context.CmsDriverManager
getDriverManager()
Gets the current driver manager.int
hashCode()
-
-
-
Constructor Detail
-
ResourceOUCacheKey
public ResourceOUCacheKey(CmsDriverManager driverManager, CmsDbContext dbc)
Creates a new instance.- Parameters:
driverManager
- the driver manager to usedbc
- the current DB context
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getDbContext
public CmsDbContext getDbContext()
Gets the stored DB context.Note that the DB contex returned by this may have been invalidated!
- Returns:
- the stored DB context
-
getDriverManager
public CmsDriverManager getDriverManager()
Gets the current driver manager.- Returns:
- the driver manager to use
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
-