|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sue445.kulib.dao.MemcacheProxyDaoBase<M>
M
- ModelClasspublic abstract class MemcacheProxyDaoBase<M extends Slim3Model>
Datasrore access proxy dao with Memcache
Field Summary | |
---|---|
protected static Logger |
logger
|
protected ModelMeta<M> |
m
The meta data of model. |
protected Class<M> |
modelClass
The model class. |
Constructor Summary | |
---|---|
MemcacheProxyDaoBase()
Constructor. |
Method Summary | |
---|---|
protected String |
createMemcacheKey(Key key)
|
protected List<String> |
createMemcacheKeys(Iterable<Key> keys)
|
void |
delete(Key key)
delete model in both Datastote and Memcache |
void |
deleteAll(Iterable<Key> keys)
delete models in both Datastote and Memcache |
protected void |
deleteAllInMemcache(Iterable<Key> keys)
|
protected void |
deleteInMemcache(Key key)
|
M |
get(Key key)
get model from Memcache or Datastore. if not found in Memcache, get from Datastore and put to Memcache. |
List<M> |
getAll(Iterable<Key> keys)
get models from Memcache or Datastore. if not found in Memcache, get from Datastore and put to Memcache. |
protected Map<String,M> |
getAllFromMemcache(Iterable<Key> keys)
|
protected M |
getFromMemcache(Key key)
|
void |
put(M model)
put model and clear Memcache |
void |
putAll(Iterable<M> models)
put models and clear Memcache |
protected void |
putAllToMemcache(Iterable<M> models)
|
protected void |
putToMemcache(M model)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger logger
protected Class<M extends Slim3Model> modelClass
protected ModelMeta<M extends Slim3Model> m
Constructor Detail |
---|
public MemcacheProxyDaoBase()
Method Detail |
---|
public void put(M model)
model
- public void putAll(Iterable<M> models)
models
- protected String createMemcacheKey(Key key)
key
-
protected List<String> createMemcacheKeys(Iterable<Key> keys)
keys
-
protected void deleteInMemcache(Key key)
key
- protected void deleteAllInMemcache(Iterable<Key> keys)
keys
- public M get(Key key)
key
-
protected M getFromMemcache(Key key)
key
-
protected void putToMemcache(M model)
model
- protected void putAllToMemcache(Iterable<M> models)
models
- public List<M> getAll(Iterable<Key> keys)
keys
-
protected Map<String,M> getAllFromMemcache(Iterable<Key> keys)
keys
-
public void delete(Key key)
key
- public void deleteAll(Iterable<Key> keys)
key
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |