Class SlotTable


  • public class SlotTable
    extends java.lang.Object
    SlotTable is used internally by PICurrent to store the slot information.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean dirtyFlag
      The flag to check whether there are any updates in the current SlotTable.
      private ORB orb
      Required for instantiating Any object.
      private Any[] theSlotData
      The vector where all the slot data for the current thread is stored
    • Constructor Summary

      Constructors 
      Constructor Description
      SlotTable​(ORB orb, int slotSize)
      The constructor instantiates an Array of Any[] of size given by slotSize parameter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Any get_slot​(int id)
      This method get the slot data for the given slot id (index).
      (package private) int getSize()
      This method returns the size of the allocated slots.
      (package private) void resetSlots()
      This method resets all the slot data to null if dirtyFlag is set.
      void set_slot​(int id, Any data)
      This method sets the slot data at the given slot id (index).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • theSlotData

        private Any[] theSlotData
        The vector where all the slot data for the current thread is stored
      • orb

        private ORB orb
        Required for instantiating Any object.
      • dirtyFlag

        private boolean dirtyFlag
        The flag to check whether there are any updates in the current SlotTable. The slots will be reset to null, only if this flag is set.
    • Constructor Detail

      • SlotTable

        SlotTable​(ORB orb,
                  int slotSize)
        The constructor instantiates an Array of Any[] of size given by slotSize parameter.
        Parameters:
        orb - The ORB
        slotSize - Size of array
    • Method Detail

      • set_slot

        public void set_slot​(int id,
                             Any data)
                      throws InvalidSlot
        This method sets the slot data at the given slot id (index).
        Parameters:
        id - Index
        data - Slot data
        Throws:
        InvalidSlot - If the id is greater than the slot data size.
      • get_slot

        public Any get_slot​(int id)
                     throws InvalidSlot
        This method get the slot data for the given slot id (index).
        Parameters:
        id - Index
        Returns:
        Slot data
        Throws:
        InvalidSlot - If the id is greater than the slot data size.
      • resetSlots

        void resetSlots()
        This method resets all the slot data to null if dirtyFlag is set.
      • getSize

        int getSize()
        This method returns the size of the allocated slots.
        Returns:
        slot size