org.mmtk.vm.gcspy
Class ServerSpace

java.lang.Object
  extended by org.mmtk.vm.gcspy.ServerSpace
Direct Known Subclasses:
ServerSpace

public abstract class ServerSpace
extends Object

Abstract class for the GCspy Space abstraction.

Implementing classes will largely forward calls to the gcspy C library.


Field Summary
protected static boolean DEBUG
           
protected static String DEFAULT_UNUSED_STRING
          The "unused" string
protected  Address driver
          a pointer to the C driver, gcspy_gc_drivert *driver
protected  int spaceId
          the space's ID
 
Constructor Summary
ServerSpace()
           
 
Method Summary
abstract  Address addStream(int id)
          Add a stream to the native driver
 void endCommunication()
          End the transmission (for this event)
(package private)  Address getDriverAddress()
          Get a pointer to the native driver
abstract  void resize(int size)
          Tell the C driver to resize
abstract  void sendControls(AbstractDriver space, int tileNum)
          Send all the control info for the space
abstract  void setTilename(int i, Address start, Address end)
          Tell the native driver the tile name.
abstract  void setTilename(int i, Address format, long value)
          Tell the native driver the tile name.
abstract  void setTilename(int i, String format, long value)
          Tell the native driver the tile names.
abstract  void spaceInfo(Address info)
          Send info for this space
abstract  void startCommunication()
          Start a transmission
abstract  void stream(int id, int len)
          Start transmitting a stream.
abstract  void streamByteValue(byte value)
          Send a byte
abstract  void streamEnd()
          End of this stream
abstract  void streamIntValue(int value)
          Send an int
abstract  void streamShortValue(short value)
          Send a short
abstract  void summary(int id, int len)
          Start to send a summary
abstract  void summaryEnd()
          End the summary
abstract  void summaryValue(int val)
          Send a summary value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_UNUSED_STRING

protected static final String DEFAULT_UNUSED_STRING
The "unused" string

See Also:
Constant Field Values

spaceId

protected int spaceId
the space's ID


driver

protected Address driver
a pointer to the C driver, gcspy_gc_drivert *driver


DEBUG

protected static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

ServerSpace

public ServerSpace()
Method Detail

getDriverAddress

Address getDriverAddress()
Get a pointer to the native driver

Returns:
The address of the C driver, gcspy_gc_drivert *, used in all calls to the C library.

setTilename

public abstract void setTilename(int i,
                                 Address start,
                                 Address end)
Tell the native driver the tile name.

Parameters:
i - the number of the tile
start - the starting address of the tile
end - the end address

setTilename

public abstract void setTilename(int i,
                                 Address format,
                                 long value)
Tell the native driver the tile name.

Parameters:
i - the number of the tile
format - the name of the tile, a format string
value - The value for the format string

setTilename

public abstract void setTilename(int i,
                                 String format,
                                 long value)
Tell the native driver the tile names.

Parameters:
i - the number of the tile
format - The name, including format tags
value - The value for the format string

resize

public abstract void resize(int size)
Tell the C driver to resize

Parameters:
size - the new driver size

startCommunication

public abstract void startCommunication()
Start a transmission


addStream

public abstract Address addStream(int id)
Add a stream to the native driver

Parameters:
id - the stream's ID
Returns:
the address of the C gcspy_gc_stream_t

stream

public abstract void stream(int id,
                            int len)
Start transmitting a stream.

Parameters:
id - The stream's ID
len - The number of items in the stream

streamByteValue

public abstract void streamByteValue(byte value)
Send a byte

Parameters:
value - The byte

streamShortValue

public abstract void streamShortValue(short value)
Send a short

Parameters:
value - The short

streamIntValue

public abstract void streamIntValue(int value)
Send an int

Parameters:
value - The int

streamEnd

public abstract void streamEnd()
End of this stream


summary

public abstract void summary(int id,
                             int len)
Start to send a summary

Parameters:
id - The stream's ID
len - The number of items to be sent

summaryValue

public abstract void summaryValue(int val)
Send a summary value

Parameters:
val - The value

summaryEnd

public abstract void summaryEnd()
End the summary


sendControls

public abstract void sendControls(AbstractDriver space,
                                  int tileNum)
Send all the control info for the space

Parameters:
space - The GCspy driver for this space
tileNum - The number of tiles

spaceInfo

public abstract void spaceInfo(Address info)
Send info for this space

Parameters:
info - A pointer to the information (held as C string)

endCommunication

public void endCommunication()
End the transmission (for this event)