public abstract class AbstractDataLayer extends Object implements IDataLayer
| Modifier and Type | Field and Description |
|---|---|
protected IDBCluster |
dbCluster
数据库集群引用.
|
protected IEntityMetaManager |
entityMetaManager |
protected IPrimaryCache |
primaryCache
一级缓存.
|
protected ISecondCache |
secondCache
二级缓存.
|
protected TransactionManager |
txManager |
| Constructor and Description |
|---|
AbstractDataLayer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
fillParam(PreparedStatement ps,
SQL sql) |
IDBCluster |
getDBCluster()
get db cluster.
|
IPrimaryCache |
getPrimaryCache()
get second cache.
|
ISecondCache |
getSecondCache()
get second cache.
|
TransactionManager |
getTransactionManager()
get transaction manster.
|
protected boolean |
isCacheAvailable(Class<?> clazz)
判断一级缓存是否可用
|
protected boolean |
isCacheAvailable(Class<?> clazz,
boolean useCache)
判断一级缓存是否可用
|
protected boolean |
isSecondCacheAvailable(Class<?> clazz)
判断二级缓存是否可用
|
protected boolean |
isSecondCacheAvailable(Class<?> clazz,
boolean useCache)
判断二级缓存是否可用
|
void |
setDBCluster(IDBCluster dbCluster)
set db cluster.
|
void |
setPrimaryCache(IPrimaryCache primaryCache)
set primary cache.
|
void |
setSecondCache(ISecondCache secondCache)
set second cache.
|
void |
setTransactionManager(TransactionManager txManager)
set transaction manager.
|
protected IDBCluster dbCluster
protected IPrimaryCache primaryCache
protected ISecondCache secondCache
protected TransactionManager txManager
protected IEntityMetaManager entityMetaManager
public IDBCluster getDBCluster()
IDataLayergetDBCluster in interface IDataLayerpublic void setDBCluster(IDBCluster dbCluster)
IDataLayersetDBCluster in interface IDataLayerpublic IPrimaryCache getPrimaryCache()
IDataLayergetPrimaryCache in interface IDataLayerpublic void setPrimaryCache(IPrimaryCache primaryCache)
IDataLayersetPrimaryCache in interface IDataLayerpublic ISecondCache getSecondCache()
IDataLayergetSecondCache in interface IDataLayerpublic void setSecondCache(ISecondCache secondCache)
IDataLayersetSecondCache in interface IDataLayerpublic void setTransactionManager(TransactionManager txManager)
IDataLayersetTransactionManager in interface IDataLayerpublic TransactionManager getTransactionManager()
IDataLayergetTransactionManager in interface IDataLayerprotected void fillParam(PreparedStatement ps, SQL sql) throws SQLException
SQLExceptionprotected boolean isCacheAvailable(Class<?> clazz)
protected boolean isSecondCacheAvailable(Class<?> clazz)
protected boolean isCacheAvailable(Class<?> clazz, boolean useCache)
protected boolean isSecondCacheAvailable(Class<?> clazz, boolean useCache)
Copyright © 2015. All rights reserved.