public final class CacheObject extends Object implements Serializable
Title: 常用代码打包
Description: Wrapper for all objects put into cache. It's primary purpose is to maintain references to the linked lists that maintain the creation time of the object and the ordering of the most used objects. This class is optimized for speed rather than strictly correct encapsulation.
Copyright: Copyright (c) 2006
Company: www.justdos.net
| 限定符和类型 | 字段和说明 |
|---|---|
LinkedListNode |
ageListNode
A reference to the node in the age order list.
|
LinkedListNode |
lastAccessedListNode
A reference to the node in the cache order list.
|
Object |
object
Underlying object wrapped by the CacheObject.
|
int |
readCount
A count of the number of times the object has been read from cache.
|
int |
size
The size of the Cacheable object.
|
| 构造器和说明 |
|---|
CacheObject(Object object,
int size)
Creates a new cache object wrapper.
|
public Object object
public int size
public LinkedListNode lastAccessedListNode
public LinkedListNode ageListNode
public int readCount
public CacheObject(Object object, int size)
object - the underlying Object to wrap.size - the size of the Cachable object in bytes.Copyright © 2023 onecode. All rights reserved.