org.mailster.util
Class AbstractReloadableSoftReference<E,T>
java.lang.Object
org.mailster.util.AbstractReloadableSoftReference<E,T>
- Direct Known Subclasses:
- SoftSmtpMessageReference
public abstract class AbstractReloadableSoftReference<E,T>
- extends java.lang.Object
---
Mailster (C) 2007-2009 De Oliveira Edouard
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 675 Mass
Ave, Cambridge, MA 02139, USA.
See Mailster
Web Site
---
AbstractReloadableSoftReference.java - Provides a reloadable soft reference
for an object.
- Version:
- $Revision: 1.3 $, $Date: 2008/12/06 13:57:17 $
- Author:
- Edouard De Oliveira
|
Field Summary |
private E |
key
|
private java.lang.ref.SoftReference<T> |
ref
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ref
private java.lang.ref.SoftReference<T> ref
key
private E key
AbstractReloadableSoftReference
public AbstractReloadableSoftReference(E key,
T object)
store
public abstract void store(T object)
reload
public abstract T reload()
delete
public abstract void delete()
get
public T get()
- This method may return null if object has been gc'ed.
- Returns:
- the object.
getReference
public T getReference()
getKey
public E getKey()