|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectml.shifu.guagua.util.BytableDiskList<T>
public class BytableDiskList<T extends Bytable>
A list wrapper to implement store Bytable 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 |
| 构造方法摘要 | |
|---|---|
BytableDiskList(String fileName,
String className)
Constructor with file name in current working dir and instance class name. |
|
BytableDiskList(String fileName,
String className,
BytableSerializer<T> serializer)
Constructor with file name in current working dir, class name and serializer instance. |
|
| 方法摘要 | |
|---|---|
boolean |
append(T t)
Append object to this list |
void |
clear()
Delete file to store elements. |
void |
close()
This method should be called at the end of BytableDiskList usage to release file descriptors. |
BytableSerializer<T> |
getSerializer()
|
Iterator<T> |
iterator()
|
void |
reOpen()
Re-open stream for iterators. |
void |
setSerializer(BytableSerializer<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 BytableDiskList(String fileName,
String className)
public BytableDiskList(String fileName,
String className,
BytableSerializer<T> serializer)
| 方法详细信息 |
|---|
public void switchState()
AppendList<T extends Bytable> 中的 switchStatepublic void reOpen()
public boolean append(T t)
AppendList 复制的描述
AppendList<T extends Bytable> 中的 appendt - the object to append
public void close()
BytableDiskList usage to release file descriptors.
public Iterator<T> iterator()
Iterable<T extends Bytable> 中的 iteratorpublic BytableSerializer<T> getSerializer()
public void setSerializer(BytableSerializer<T> serializer)
serializer - the serializer to setpublic long size()
AppendList 复制的描述
AppendList<T extends Bytable> 中的 sizepublic void clear()
AppendList<T extends Bytable> 中的 clear
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||