*/
protected void updateCollectionMeta() {
// update the meta data if necessary
if (isMetaEnabled()) {
MetaSystemCollection metacol = getMetaSystemCollection();
MetaData meta;
try {
meta = metacol.getCollectionMeta(this);
} catch (DBException e) {
// something strange has happened.. can't get the
// meta data for this collection
if (log.isWarnEnabled()) {
log.warn("Error fetching meta for collection '" + getCanonicalName() + "'", e);
}
return;
}
if (log.isTraceEnabled()) {
log.trace(debugHeader() + "Updating modified time for collection");
}
long now = System.currentTimeMillis();
if (null == meta) {
meta = new MetaData(MetaData.COLLECTION, getCanonicalName(), now, now);
} else if (!meta.hasContext()) {
// Newly created meta. Update its created and modified time.
meta.setContext(now, now);
} else {
// This collection already has a meta. So update its modified time.
meta.setContext(0, now);
}
try {
metacol.setCollectionMeta(this, meta);
} catch (DBException e) {