needsrefreshexception.java
来自「一个不错的cache」· Java 代码 · 共 43 行
JAVA
43 行
/* * Copyright (c) 2002-2003 by OpenSymphony * All rights reserved. */package com.opensymphony.oscache.base;/** * This exception is thrown when retrieving an item from cache and it is * expired. * Note that for fault tolerance purposes, it is possible to retrieve the * current cached object from the exception. * * <p>January, 2004 - The OSCache developers are aware of the fact that throwing * an exception for a perfect valid situation (cache miss) is design smell. This will * be removed in the near future, and other means of refreshing the cache will be * provided.</p> * * @author <a href="mailto:fbeauregard@pyxis-tech.com">Francois Beauregard</a> * @version $Revision: 1.3 $ */public final class NeedsRefreshException extends Exception { /** * Current object in the cache */ private Object cacheContent = null; /** * Create a NeedsRefreshException */ public NeedsRefreshException(Object cacheContent) { super(); this.cacheContent = cacheContent; } /** * Retrieve current object in the cache */ public Object getCacheContent() { return cacheContent; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?