All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class magician.Node.Resource

java.lang.Object
   |
   +----magician.Node.Resource

public class Resource
extends Object
class Resource represents an active node resources which may be utilized by a Smart Packet


Variable Index

 o creationTime
Creation Time
 o size
Size (in resource dependent unit)
 o spOwner
Who creates me?

Constructor Index

 o Resource()
For small states, ResourceMgr don't care who the owner is
 o Resource(KUSmartPacketV2)
Creates a new Resource

Method Index

 o age()
Returns the age of this resource (in milliseconds)
 o getOwner()
Returns the owner of this resource
 o getSize()
Return the size of the object

Variables

 o spOwner
 protected KUSmartPacketV2 spOwner
Who creates me?

 o creationTime
 protected static final long creationTime
Creation Time

 o size
 protected long size
Size (in resource dependent unit)

Constructors

 o Resource
 public Resource(KUSmartPacketV2 sp)
Creates a new Resource

Parameters:
sp - the Smartpacket that owns this
 o Resource
 public Resource()
For small states, ResourceMgr don't care who the owner is

Methods

 o getOwner
 public KUSmartPacketV2 getOwner()
Returns the owner of this resource

Returns:
Smartpacket that is the owner
 o age
 public long age()
Returns the age of this resource (in milliseconds)

Returns:
time since creation
 o getSize
 public long getSize()
Return the size of the object

Returns:
size in bytes

All Packages  Class Hierarchy  This Package  Previous  Next  Index
1