Methods Summary |
---|
public static synchronized CoordinatorLog | getCoordinatorLog()get a CoordinatorLog object from the cache. Instantiate a
new CoordinatorLog object if the cache is empty.
if (Configuration.isDBLoggingEnabled() ||
Configuration.isFileLoggingDisabled())
return null;
if (CLPool.pool.empty()) {
return new CoordinatorLog();
}
else {
CoordinatorLog cl = (CoordinatorLog) CLPool.pool.pop();
return cl;
}
|
public static synchronized CoordinatorLog | getCoordinatorLog(java.lang.String logPath)
CoordinatorLogPool clpool = (CoordinatorLogPool)CLPooltable.get(logPath);
if (clpool == null) {
clpool = new CoordinatorLogPool();
CLPooltable.put(logPath,clpool);
}
if (clpool.pool.empty()) {
return new CoordinatorLog(logPath);
}
else {
return (CoordinatorLog)clpool.pool.pop();
}
|
public static void | putCoordinatorLog(CoordinatorLog cl)return a CoordinatorLog object to the cache. To limit the size of
the cache a check is made to ensure that the cache doesn't
already have more that MAXSTACKSIZE elements. If so the object
being returned is discarded.
if (CLPool.pool.size() <= MAXSTACKSIZE) {
CLPool.pool.push(cl);
}
|
public static void | putCoordinatorLog(CoordinatorLog cl, java.lang.String logPath)
CoordinatorLogPool clpool = (CoordinatorLogPool)CLPooltable.get(logPath);
if (clpool == null) {
clpool = new CoordinatorLogPool();
CLPooltable.put(logPath,clpool);
}
if (clpool.pool.size() <= MAXSTACKSIZE) {
clpool.pool.push(cl);
}
|