|
|||||||||
| Home >> All >> org >> jgroups >> [ protocols overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jgroups.protocols
Class FragHeader

java.lang.Objectorg.jgroups.Header
org.jgroups.protocols.FragHeader
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, org.jgroups.util.Streamable
- public class FragHeader
- extends org.jgroups.Header
- implements org.jgroups.util.Streamable
- extends org.jgroups.Header
- Version:
- $Id: FragHeader.java,v 1.2 2005/04/15 13:17:02 belaban Exp $
| Field Summary | |
int |
frag_id
|
long |
id
|
int |
num_frags
|
| Fields inherited from class org.jgroups.Header |
HDR_OVERHEAD |
| Constructor Summary | |
FragHeader()
|
|
FragHeader(long id,
int frag_id,
int num_frags)
|
|
| Method Summary | |
void |
readExternal(java.io.ObjectInput in)
This method restores an object's state by reading in the instance data for the object from the passed in stream. |
void |
readFrom(java.io.DataInputStream in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed |
long |
size()
To be implemented by subclasses. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
void |
writeExternal(java.io.ObjectOutput out)
This method is responsible for writing the instance data of an object to the passed in stream. |
void |
writeTo(java.io.DataOutputStream out)
Write the entire state of the current object (including superclasses) to outstream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
id
public long id
frag_id
public int frag_id
num_frags
public int num_frags
| Constructor Detail |
FragHeader
public FragHeader()
FragHeader
public FragHeader(long id,
int frag_id,
int num_frags)
| Method Detail |
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Description copied from interface:
java.io.Externalizable - This method is responsible for writing the instance data of an object
to the passed in stream. Note that this stream is not a subclass of
OutputStream, but rather is a class that implements theObjectOutputinterface. That interface provides a number of methods for writing Java data values to a stream.Not that the implementation of this method must be coordinated with the implementation of
readExternal.- Specified by:
writeExternalin interfacejava.io.Externalizable
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Description copied from interface:
java.io.Externalizable - This method restores an object's state by reading in the instance data
for the object from the passed in stream. Note that this stream is not
a subclass of
InputStream, but rather is a class that implements theObjectInputinterface. That interface provides a mechanism for reading in Java data types from a stream.Note that this method must be compatible with
writeExternal. It must read back the exact same types that were written by that method in the exact order they were written.If this method needs to read back an object instance, then the class for that object must be found and loaded. If that operation fails, then this method throws a
ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable
writeTo
public void writeTo(java.io.DataOutputStream out) throws java.io.IOException
- Description copied from interface:
org.jgroups.util.Streamable - Write the entire state of the current object (including superclasses) to outstream.
Note that the output stream must not be closed
- Specified by:
writeToin interfaceorg.jgroups.util.Streamable
size
public long size()
- Description copied from class:
org.jgroups.Header - To be implemented by subclasses. Return the size of this object for the serialized version of it.
I.e. how many bytes this object takes when flattened into a buffer. This may be different for each instance,
or can be the same. This may also just be an estimation. E.g. FRAG uses it on Message to determine whether
or not to fragment the message. Fragmentation itself will be accurate, because the entire message will actually
be serialized into a byte buffer, so we can determine the exact size.
readFrom
public void readFrom(java.io.DataInputStream in) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException
- Description copied from interface:
org.jgroups.util.Streamable - Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
- Specified by:
readFromin interfaceorg.jgroups.util.Streamable
|
|||||||||
| Home >> All >> org >> jgroups >> [ protocols overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC