package cache.randomAccessCache;

import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;


/** A entry into the memory cache HashMap inside RandomAccessCacheSet */
public class RACacheEntry {
	
	protected RACacheEntry(){ }
	
	/** The actual object data, if we have already loaded it, maybe */
	SoftReference<Object> objectRef;
	
	/** The real request key object, if we loaded it */
	SoftReference<Object> keyRef;
	
	/** position in bytes into the file of this entry (if the file hasn't been reorganised)*/
	public long entryHeaderPos;
	
	/** Size, in bytes on disk, of the key serialised package */
	public int keyPackageSize;
	
	/** Size, in bytes on disk, of the object serialised package */ 
	public int objectPackageSize; 
	
	/** For chaining entries with colliding hashes */
	public RACacheEntry nextEntry;
	
}

