* {@inheritDoc}
*/
public synchronized SimpleArticle readData(final String name, final int properties)
throws ActionException, ProcessException {
GetRevision ac;
if (store != null) {
if (store.containsKey(name)) {
ac = new GetRevision(getVersion(), name, GetRevision.TIMESTAMP);
performAction(ac);
SimpleArticle storeSa = store.get(name);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("stored article (" + storeSa.getTitle() + ") revid: " + storeSa.getRevisionId());
}
SimpleArticle liveSa = ac.getArticle();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("live article revid: " + liveSa.getRevisionId());
}
if (liveSa.getRevisionId().equals(storeSa.getRevisionId())) {
return store.get(name);
}
}
ac = new GetRevision(getVersion(), name, properties);
performAction(ac);
LOGGER.debug("update cache (put)");
store.put(ac.getArticle());
} else {
ac = new GetRevision(getVersion(), name, properties);
performAction(ac);
}
return ac.getArticle();
}