The subclasses below define the specific type of Device instance.
public static class PrivateMemoryDevice extends Device
{
public PrivateMemoryDevice(Kind kind, long size)
{
super(kind);
this.size = size;
}
long size;
long allocatedMemory;
};
public static class SharedMemoryDevice extends Device
{
public SharedMemoryDevice(Kind kind, String name, long hint, long size)
{
super(kind);
this.name = name;
this.hint = hint;
this.size = size;
}
String name;
long hint;
long size;
};
public static class FileDevice extends Device
{
public FileDevice(Kind kind, String path)
{
super(kind);
this.path = path;
}
public String path;
};
public static class MultiFileDevice extends FileDevice
{
public MultiFileDevice(Kind kind, String path, long size)
{
super(kind, path);
this.size = size;
}
long size;
};
public static class RaidDevice extends FileDevice
{
public RaidDevice(Kind kind, String path, int raidLevel)
{
super(kind, path);
this.raidLevel = raidLevel;
}
int raidLevel;
};
size
|
The memory size in bytes of the memory block, or the multifile segment size for a MultiFileDevice (ignored for last segment) |
allocatedMemory
|
A pointer to the allocated memory for a PrivateMemoryDevice |
hint
|
The proposed region address for a SharedMemoryDevice |
path
|
The file path for a FileDevice |
| raidLevel | The raid level for a RaidDevice: 0 - (RAID-0: striping) or 1 (RAID-1: mirroring) |