public class Containers
extends java.lang.Object
| 构造器和说明 |
|---|
Containers()
Constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
addContainer(Container container)
add a Container
|
void |
deserialize(java.nio.ByteBuffer byteBuffer)
Deserialize the byte stream to init this Containers
|
void |
deserialize(java.io.DataInput dataInput)
Deserialize the byte stream to init this Containers
|
Container |
getContainer(long idx)
get the Container with the corresponding container index
|
long |
getContainerSize()
the number of all the holding containers
|
ContainerIterator |
iterator()
a iterator of the Containers
|
void |
remove(long containerIdx)
remove the container index Container
|
void |
replace(int firstLevelIdx,
int secondLevelIdx,
Container freshContainer)
replace with a fresh Container
|
void |
replace(long containerIdx,
Container freshContainer)
replace the container index one with a fresh Container
|
void |
serialize(java.nio.ByteBuffer byteBuffer)
Serialize the Containers
|
void |
serialize(java.io.DataOutput dataOutput)
Serialize the Containers
|
long |
serializedSizeInBytes()
Report the number of bytes required for serialization.
|
public void remove(long containerIdx)
containerIdx - the container indexpublic Container getContainer(long idx)
idx - the container indexpublic long addContainer(Container container)
container - a Containerpublic ContainerIterator iterator()
public void replace(long containerIdx,
Container freshContainer)
containerIdx - the container index to replacefreshContainer - the fresh onepublic void replace(int firstLevelIdx,
int secondLevelIdx,
Container freshContainer)
firstLevelIdx - the first level array indexsecondLevelIdx - the second level array indexfreshContainer - a fresh containerpublic long getContainerSize()
public long serializedSizeInBytes()
public void serialize(java.io.DataOutput dataOutput)
throws java.io.IOException
dataOutput - The destination DataOutputjava.io.IOException - Signals that an I/O exception has occurred.public void serialize(java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
byteBuffer - The destination ByteBufferjava.io.IOException - Signals that an I/O exception has occurred.public void deserialize(java.io.DataInput dataInput)
throws java.io.IOException
dataInput - The DataInputjava.io.IOException - Signals that an I/O exception has occurred.public void deserialize(java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
byteBuffer - The DataInputjava.io.IOException - Signals that an I/O exception has occurred.