|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectml.shifu.guagua.util.DiskList<T>
public class DiskList<T extends Serializable>
A list wrapper to implement store data into disk.
No size limit for this list but user should make sure valid fileName when constructing.
Only two stages support in such kind of list. The first one is WRITE, the next is read. So far random WRITE and READ are not supported in this list.
WARNING: close() should be called at last if use such List.
| 嵌套类摘要 |
|---|
| 从接口 ml.shifu.guagua.util.AppendList 继承的嵌套类/接口 |
|---|
AppendList.State |
| 构造方法摘要 | |
|---|---|
DiskList(String fileName)
Constructor with file name in current working dir. |
|
| 方法摘要 | |
|---|---|
boolean |
append(T t)
Append object to this list |
void |
clear()
Clear all elements. |
void |
close()
This method should be called at the end of DiskList usage to release file descriptors. |
ObjectSerializer<T> |
getSerializer()
|
Iterator<T> |
iterator()
|
void |
reOpen()
Re-open stream for iterators. |
void |
setSerializer(ObjectSerializer<T> serializer)
|
long |
size()
Return size of this list. |
void |
switchState()
Switch state from WRITE to READ |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public DiskList(String fileName)
| 方法详细信息 |
|---|
public void switchState()
AppendList<T extends Serializable> 中的 switchStatepublic void reOpen()
public boolean append(T t)
AppendList 复制的描述
AppendList<T extends Serializable> 中的 appendt - the object to append
public void close()
DiskList usage to release file descriptors.
public Iterator<T> iterator()
Iterable<T extends Serializable> 中的 iteratorpublic ObjectSerializer<T> getSerializer()
public void setSerializer(ObjectSerializer<T> serializer)
serializer - the serializer to setpublic long size()
AppendList 复制的描述
AppendList<T extends Serializable> 中的 sizepublic void clear()
AppendList 复制的描述
AppendList<T extends Serializable> 中的 clear
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||