appl.parallel.event
Class TransferEvent
java.lang.Object
appl.parallel.event.RemoteEvent
appl.parallel.event.CommEvent
appl.parallel.event.TransferEvent
- All Implemented Interfaces:
- Serializable
public class TransferEvent
- extends CommEvent
A TransferEvent is event which is associated with the size of a data transfer
in bytes. It is measured by serializing the data into byte stream. This is
very slow! So use this events carefully. You should check if monitoring for
this event type is enabled, before generating it! See CommEventSink
for details.
- Author:
- Dominik Appl
- See Also:
- Serialized Form
Method Summary |
protected int |
getObjectSize(Object object)
Determines the object size in a very primitive way (serializing to a byte
array and returning the byteSize) I do not have to mention here
explicitly that this is slow, do I? |
int |
getSize()
|
String |
toString()
|
TransferEvent
public TransferEvent(String src,
String target,
CommEvent.CommType type,
Object... toTransferObjects)
- Parameters:
src
- the source of the eventtarget
- the target of the eventtype
- the type of the eventtoTransferObjects
- the objects transfered (Warning: the size will be measured by
serializing the object. This is slow!)- See Also:
getObjectSize(Object)
getObjectSize
protected int getObjectSize(Object object)
- Determines the object size in a very primitive way (serializing to a byte
array and returning the byteSize) I do not have to mention here
explicitly that this is slow, do I? There is no real alternative, because
in java exists. no function like
sizeOf
in C++
- Parameters:
object
- a Serializable
object
- Returns:
- the size in bytes
getSize
public int getSize()
toString
public String toString()
- Overrides:
toString
in class Object