orca.boot.inventory
Class PopulateInventory

java.lang.Object
  extended by orca.boot.inventory.PopulateInventory

public class PopulateInventory
extends java.lang.Object


Nested Class Summary
protected  class PopulateInventory.ResourcePoolEntry
           
protected  class PopulateInventory.ResourceTypeEntry
           
 
Field Summary
protected  java.util.Hashtable inventory
           
protected  java.util.Hashtable<java.lang.String,NodeGroup> inventoryPools
           
protected  int lastRID
           
protected  LoggingTool logger
           
protected  java.util.Properties p
           
static java.lang.String PropertyInventoryMachines
           
static java.lang.String PropertyPoolMachinesPrefix
           
static java.lang.String PropertyPoolNamePrefix
           
static java.lang.String PropertyPoolPropertiesPrefix
           
static java.lang.String PropertyPoolResourceTypePrefix
           
static java.lang.String PropertyPoolsCount
           
static java.lang.String PropertyPoolTicketUnitsPrefix
           
static java.lang.String PropertyResourceMajorPrefix
           
static java.lang.String PropertyResourceNamePrefix
           
static java.lang.String PropertyResourcePoolPrefix
           
static java.lang.String PropertyResourcePropertiesPrefix
           
static java.lang.String PropertyResourceTypePrefix
           
static java.lang.String PropertyResourceUnitsPrefix
           
static java.lang.String PropertyTypesCount
           
protected  java.util.Hashtable<java.lang.String,PopulateInventory.ResourcePoolEntry> resourcePools
           
protected  java.util.Hashtable<ResourceType,PopulateInventory.ResourceTypeEntry> resourceTypes
           
protected  Site site
           
 
Constructor Summary
PopulateInventory(Site site, java.util.Properties p)
           
 
Method Summary
protected  void configureResourcePools()
           
protected  void configureResourceTypes()
           
protected  void createTickets(Slice slice, ResourceType type, int units)
           
protected  java.util.Hashtable<java.lang.String,ResourceType> getNodeMap()
          Creates a map: node -> resource type
protected  java.util.Hashtable<java.lang.String,PopulateInventory.ResourcePoolEntry> getNodeMapPools()
          Creates a map: node -> resource pool
protected  void populate()
           
 void process()
          Loads inventory.
 void readInventory(IConcreteSet cset)
           
protected  void transferToSite()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PropertyInventoryMachines

public static final java.lang.String PropertyInventoryMachines
See Also:
Constant Field Values

PropertyTypesCount

public static final java.lang.String PropertyTypesCount
See Also:
Constant Field Values

PropertyResourceMajorPrefix

public static final java.lang.String PropertyResourceMajorPrefix
See Also:
Constant Field Values

PropertyResourceTypePrefix

public static final java.lang.String PropertyResourceTypePrefix
See Also:
Constant Field Values

PropertyResourcePropertiesPrefix

public static final java.lang.String PropertyResourcePropertiesPrefix
See Also:
Constant Field Values

PropertyResourceNamePrefix

public static final java.lang.String PropertyResourceNamePrefix
See Also:
Constant Field Values

PropertyResourcePoolPrefix

public static final java.lang.String PropertyResourcePoolPrefix
See Also:
Constant Field Values

PropertyResourceUnitsPrefix

public static final java.lang.String PropertyResourceUnitsPrefix
See Also:
Constant Field Values

PropertyPoolsCount

public static final java.lang.String PropertyPoolsCount
See Also:
Constant Field Values

PropertyPoolNamePrefix

public static final java.lang.String PropertyPoolNamePrefix
See Also:
Constant Field Values

PropertyPoolResourceTypePrefix

public static final java.lang.String PropertyPoolResourceTypePrefix
See Also:
Constant Field Values

PropertyPoolPropertiesPrefix

public static final java.lang.String PropertyPoolPropertiesPrefix
See Also:
Constant Field Values

PropertyPoolMachinesPrefix

public static final java.lang.String PropertyPoolMachinesPrefix
See Also:
Constant Field Values

PropertyPoolTicketUnitsPrefix

public static final java.lang.String PropertyPoolTicketUnitsPrefix
See Also:
Constant Field Values

site

protected Site site

inventory

protected java.util.Hashtable inventory

inventoryPools

protected java.util.Hashtable<java.lang.String,NodeGroup> inventoryPools

logger

protected LoggingTool logger

lastRID

protected int lastRID

p

protected java.util.Properties p

resourceTypes

protected java.util.Hashtable<ResourceType,PopulateInventory.ResourceTypeEntry> resourceTypes

resourcePools

protected java.util.Hashtable<java.lang.String,PopulateInventory.ResourcePoolEntry> resourcePools
Constructor Detail

PopulateInventory

public PopulateInventory(Site site,
                         java.util.Properties p)
Method Detail

getNodeMap

protected java.util.Hashtable<java.lang.String,ResourceType> getNodeMap()
Creates a map: node -> resource type

Returns:

getNodeMapPools

protected java.util.Hashtable<java.lang.String,PopulateInventory.ResourcePoolEntry> getNodeMapPools()
Creates a map: node -> resource pool

Returns:

process

public void process()
             throws java.lang.Exception
Loads inventory.

Throws:
java.lang.Exception

transferToSite

protected void transferToSite()

populate

protected void populate()
                 throws java.lang.Exception
Throws:
java.lang.Exception

createTickets

protected void createTickets(Slice slice,
                             ResourceType type,
                             int units)
                      throws java.lang.Exception
Throws:
java.lang.Exception

readInventory

public void readInventory(IConcreteSet cset)
                   throws java.lang.Exception
Throws:
java.lang.Exception

configureResourceTypes

protected void configureResourceTypes()
                               throws java.lang.Exception
Throws:
java.lang.Exception

configureResourcePools

protected void configureResourcePools()
                               throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.