org.eclipse.persistence.internal.helper.Helper.getCalendarCache()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.eclipse.persistence.internal.helper.Helper.getCalendarCache()方法的一些代码示例,展示了Helper.getCalendarCache()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.getCalendarCache()方法的具体详情如下:
包路径:org.eclipse.persistence.internal.helper.Helper
类名称:Helper
方法名:getCalendarCache

Helper.getCalendarCache介绍

[英]PERF: Return the calendar cache use to avoid calendar creation for processing java.sql/util.Date/Time/Timestamp objects.
[中]PERF:返回日历缓存,以避免为处理java而创建日历。sql/util。日期/时间/时间戳对象。

代码示例

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PERF: This is used to optimize Calendar conversion/printing.
 * This should only be used when a calendar is temporarily required,
 * when finished it must be released back.
 */
public static void releaseCalendar(Calendar calendar) {
  getCalendarCache().offer(calendar);
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * PERF: This is used to optimize Calendar conversion/printing.
 * This should only be used when a calendar is temporarily required,
 * when finished it must be released back.
 */
public static void releaseCalendar(Calendar calendar) {
  getCalendarCache().offer(calendar);
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PERF: This is used to optimize Calendar conversion/printing.
 * This should only be used when a calendar is temporarily required,
 * when finished it must be released back.
 */
public static void releaseCalendar(Calendar calendar) {
  getCalendarCache().offer(calendar);
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PERF: This is used to optimize Calendar conversion/printing.
 * This should only be used when a calendar is temporarily required,
 * when finished it must be released back.
 */
public static Calendar allocateCalendar() {
  Calendar calendar = getCalendarCache().poll();
  if (calendar == null) {
    calendar = Calendar.getInstance();
  }
  return calendar;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PERF: This is used to optimize Calendar conversion/printing.
 * This should only be used when a calendar is temporarily required,
 * when finished it must be released back.
 */
public static Calendar allocateCalendar() {
  Calendar calendar = getCalendarCache().poll();
  if (calendar == null) {
    calendar = Calendar.getInstance();
  }
  return calendar;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * PERF: This is used to optimize Calendar conversion/printing.
 * This should only be used when a calendar is temporarily required,
 * when finished it must be released back.
 */
public static Calendar allocateCalendar() {
  Calendar calendar = getCalendarCache().poll();
  if (calendar == null) {
    calendar = Calendar.getInstance();
  }
  return calendar;
}

相关文章

Helper类方法