public class MemCachedCacheBuilder extends Object implements ICacheBuilder
| Modifier and Type | Field and Description |
|---|---|
private boolean |
isCacheEnabled |
static org.slf4j.Logger |
LOG |
private String |
primaryCacheAddress |
private Class<IPrimaryCache> |
primaryCacheClass |
private int |
primaryCacheExpire |
private String |
secondCacheAddress |
private Class<ISecondCache> |
secondCacheClass |
private int |
secondCacheExpire |
| Modifier | Constructor and Description |
|---|---|
private |
MemCachedCacheBuilder() |
| Modifier and Type | Method and Description |
|---|---|
private void |
_sleep(int time) |
IPrimaryCache |
buildPrimaryCache()
build primary cache.
|
ISecondCache |
buildSecondCache()
build second cache.
|
String |
getPrimaryCacheAddress() |
Class<IPrimaryCache> |
getPrimaryCacheClass() |
int |
getPrimaryCacheExpire() |
String |
getSecondCacheAddress() |
Class<ISecondCache> |
getSecondCacheClass() |
int |
getSecondCacheExpire() |
boolean |
isCacheEnabled() |
void |
setCacheEnabled(boolean isCacheEnabled) |
void |
setPrimaryCacheAddress(String primaryCacheAddress) |
void |
setPrimaryCacheClass(Class<IPrimaryCache> clazz) |
void |
setPrimaryCacheExpire(int primaryCacheExpire) |
void |
setSecondCacheAddress(String secondCacheAddress) |
void |
setSecondCacheClass(Class<ISecondCache> clazz) |
void |
setSecondCacheExpire(int secondCacheExpire) |
static ICacheBuilder |
valueOf(IClusterConfig config) |
public static final org.slf4j.Logger LOG
private boolean isCacheEnabled
private Class<IPrimaryCache> primaryCacheClass
private String primaryCacheAddress
private int primaryCacheExpire
private Class<ISecondCache> secondCacheClass
private String secondCacheAddress
private int secondCacheExpire
public static ICacheBuilder valueOf(IClusterConfig config)
public IPrimaryCache buildPrimaryCache()
buildPrimaryCache in interface ICacheBuilderpublic ISecondCache buildSecondCache()
buildSecondCache in interface ICacheBuilderprivate void _sleep(int time)
public void setPrimaryCacheClass(Class<IPrimaryCache> clazz)
public Class<IPrimaryCache> getPrimaryCacheClass()
public void setSecondCacheClass(Class<ISecondCache> clazz)
public Class<ISecondCache> getSecondCacheClass()
public String getPrimaryCacheAddress()
public void setPrimaryCacheAddress(String primaryCacheAddress)
public int getPrimaryCacheExpire()
public void setPrimaryCacheExpire(int primaryCacheExpire)
public String getSecondCacheAddress()
public void setSecondCacheAddress(String secondCacheAddress)
public int getSecondCacheExpire()
public void setSecondCacheExpire(int secondCacheExpire)
public boolean isCacheEnabled()
public void setCacheEnabled(boolean isCacheEnabled)
Copyright © 2015. All rights reserved.