本文整理汇总了Java中org.eclipse.jetty.util.DateCache类的典型用法代码示例。如果您正苦于以下问题:Java DateCache类的具体用法?Java DateCache怎么用?Java DateCache使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DateCache类属于org.eclipse.jetty.util包,在下文中一共展示了DateCache类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: doStart
import org.eclipse.jetty.util.DateCache; //导入依赖的package包/类
/**
* Set up request logging and open log file.
*
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
*/
@Override
protected synchronized void doStart() throws Exception
{
if (_logDateFormat != null)
{
// FIXME _logTimeZone should be used for DateCache but Jetty 8's implementation doesn't support it
_logDateCache = new DateCache(_logDateFormat, _logLocale);
}
if (_ignorePaths != null && _ignorePaths.length > 0)
{
_ignorePathMap = new PathMap();
for (int i = 0; i < _ignorePaths.length; i++)
_ignorePathMap.put(_ignorePaths[i], _ignorePaths[i]);
}
else
_ignorePathMap = null;
super.doStart();
}
开发者ID:confluentinc,项目名称:rest-utils,代码行数:26,代码来源:AbstractNCSARequestLog.java
示例2: AsyncRequestLog
import org.eclipse.jetty.util.DateCache; //导入依赖的package包/类
public AsyncRequestLog(Clock clock,
AppenderAttachableImpl<ILoggingEvent> appenders,
final TimeZone timeZone,
List<String> cookies) {
this.clock = clock;
this.cookies = cookies;
this.queue = new LinkedBlockingQueue<String>();
this.dispatcher = new Dispatcher();
this.dispatchThread = new Thread(dispatcher);
dispatchThread.setName("async-request-log-dispatcher-" + THREAD_COUNTER.incrementAndGet());
dispatchThread.setDaemon(true);
this.dateCache = new ThreadLocal<DateCache>() {
@Override
protected DateCache initialValue() {
final DateCache cache = new DateCache("dd/MMM/yyyy:HH:mm:ss Z", Locale.US);
cache.setTimeZoneID(timeZone.getID());
return cache;
}
};
this.appenders = appenders;
}
开发者ID:wotifgroup,项目名称:grails-lightweight-deploy,代码行数:24,代码来源:AsyncRequestLog.java
示例3: doStart
import org.eclipse.jetty.util.DateCache; //导入依赖的package包/类
protected void doStart() throws Exception
{
if (_logDateFormat!=null)
{
_logDateCache = new DateCache(_logDateFormat, _logLocale);
_logDateCache.setTimeZoneID(_logTimeZone);
}
if (_filename != null)
{
_fileOut = new RolloverFileOutputStream(_filename,_append,_retainDays,TimeZone.getTimeZone(_logTimeZone),_filenameDateFormat,null);
_closeOut = true;
Log.getLogger((String)null).info("Opened "+getDatedFilename());
}
else
_fileOut = System.err;
_out = _fileOut;
if (_ignorePaths != null && _ignorePaths.length > 0)
{
_ignorePathMap = new PathMap();
for (int i = 0; i < _ignorePaths.length; i++)
_ignorePathMap.put(_ignorePaths[i], _ignorePaths[i]);
}
else
_ignorePathMap = null;
_writer = new OutputStreamWriter(_out);
_buffers = new ArrayList<Utf8StringBuilder>();
_copy = new char[1024];
super.doStart();
}
开发者ID:NoYouShutup,项目名称:CryptMeme,代码行数:34,代码来源:I2PRequestLog.java
注:本文中的org.eclipse.jetty.util.DateCache类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论