@Override protected DateFormatCache initialValue() { return new DateFormatCache(localCacheSize, timeFormat, globalDateCache); } };
protected void addTimestamp(StringBuilder buf, long timestamp) { buf.append(localDateCache.get().getFormat(timestamp)); long frac = timestamp % 1000; buf.append('.'); if (frac < 100) { if (frac < 10) { buf.append('0'); buf.append('0'); } else { buf.append('0'); } } buf.append(frac); } }
public DateFormatCache(int size, String format, DateFormatCache parent) { cacheSize = size; this.format = tidyFormat(format); Cache parentCache = null; if (parent != null) { synchronized(parent) { parentCache = parent.cache; } } cache = new Cache(parentCache); }
/** * Obtain the format currently being used for time stamps in log messages. * * @return The current format in {@link java.text.SimpleDateFormat} syntax */ public String getTimeFormat() { return localDateCache.get().getTimeFormat(); }
/** * Obtain the format currently being used for time stamps in log messages. * * @return The current format in {@link java.text.SimpleDateFormat} syntax */ public String getTimeFormat() { return localDateCache.get().getTimeFormat(); }
@Override protected DateFormatCache initialValue() { return new DateFormatCache(localCacheSize, timeFormat, globalDateCache); } };
public DateFormatCache(int size, String format, DateFormatCache parent) { cacheSize = size; this.format = tidyFormat(format); Cache parentCache = null; if (parent != null) { synchronized(parent) { parentCache = parent.cache; } } cache = new Cache(parentCache); }
protected void addTimestamp(StringBuilder buf, long timestamp) { buf.append(localDateCache.get().getFormat(timestamp)); long frac = timestamp % 1000; buf.append('.'); if (frac < 100) { if (frac < 10) { buf.append('0'); buf.append('0'); } else { buf.append('0'); } } buf.append(frac); }
@Override protected DateFormatCache initialValue() { return new DateFormatCache(localCacheSize, timeFormat, globalDateCache); } };
public DateFormatCache(int size, String format, DateFormatCache parent) { cacheSize = size; this.format = tidyFormat(format); Cache parentCache = null; if (parent != null) { synchronized(parent) { parentCache = parent.cache; } } cache = new Cache(parentCache); }
protected void addTimestamp(StringBuilder buf, long timestamp) { buf.append(localDateCache.get().getFormat(timestamp)); long frac = timestamp % 1000; buf.append('.'); if (frac < 100) { if (frac < 10) { buf.append('0'); buf.append('0'); } else { buf.append('0'); } } buf.append(frac); }
@Override protected DateFormatCache initialValue() { return new DateFormatCache(localCacheSize, timeFormat, globalDateCache); } };
public DateFormatCache(int size, String format, DateFormatCache parent) { cacheSize = size; this.format = tidyFormat(format); Cache parentCache = null; if (parent != null) { synchronized(parent) { parentCache = parent.cache; } } cache = new Cache(parentCache); }
protected void addTimestamp(StringBuilder buf, long timestamp) { buf.append(localDateCache.get().getFormat(timestamp)); long frac = timestamp % 1000; buf.append('.'); if (frac < 100) { if (frac < 10) { buf.append('0'); buf.append('0'); } else { buf.append('0'); } } buf.append(frac); }
@Override protected DateFormatCache initialValue() { return new DateFormatCache(localCacheSize, timeFormat, globalDateCache); } };
public DateFormatCache(int size, String format, DateFormatCache parent) { cacheSize = size; this.format = tidyFormat(format); Cache parentCache = null; if (parent != null) { synchronized(parent) { parentCache = parent.cache; } } cache = new Cache(parentCache); }
protected void addTimestamp(StringBuilder buf, long timestamp) { buf.append(localDateCache.get().getFormat(timestamp)); long frac = timestamp % 1000; buf.append('.'); if (frac < 100) { if (frac < 10) { buf.append('0'); buf.append('0'); } else { buf.append('0'); } } buf.append(frac); } }
@Override protected DateFormatCache initialValue() { return new DateFormatCache(localCacheSize, timeFormat, globalDateCache); } };
public DateFormatCache(int size, String format, DateFormatCache parent) { cacheSize = size; this.format = tidyFormat(format); Cache parentCache = null; if (parent != null) { synchronized(parent) { parentCache = parent.cache; } } cache = new Cache(parentCache); }
protected void addTimestamp(StringBuilder buf, long timestamp) { buf.append(localDateCache.get().getFormat(timestamp)); long frac = timestamp % 1000; buf.append('.'); if (frac < 100) { if (frac < 10) { buf.append('0'); buf.append('0'); } else { buf.append('0'); } } buf.append(frac); } }