Class TopService

java.lang.Object
org.apache.derby.impl.services.monitor.TopService

final class TopService extends Object
A description of an instance of a module.
  • Field Details

  • Constructor Details

  • Method Details

    • setTopModule

      void setTopModule(Object instance)
    • getService

      Object getService()
    • isPotentialService

      boolean isPotentialService(ProtocolKey otherKey)
    • isActiveService

      boolean isActiveService()
    • isActiveService

      boolean isActiveService(ProtocolKey otherKey)
    • findModule

      Object findModule(ProtocolKey key, boolean findOnly, Properties properties)
      Find an module in the protocol table that supports the required protocol name combination and can handle the properties. Returns the instance of the module or null if one does not exist in the protocol table.
    • findModuleInstance

      private ModuleInstance findModuleInstance(Object instance)
      Find a ModuleInstance object whose getInstance() method returns the object specified by the instance parameter.
      Parameters:
      instance - the instance to look for
      Returns:
      a ModuleInstance object, or null if no match was found
    • bootModule

      Object bootModule(boolean create, Object service, ProtocolKey key, Properties properties) throws StandardException
      Boot a module, performs three steps.
      1. Look for an existing module in the protocol table
      2. Look for a module in the implementation table that handles this protocol
      3. Create an instance that handles this protocol.
      Throws:
      StandardException
    • shutdown

      boolean shutdown()
      If the service is already beign shutdown we return false.
    • addToProtocol

      private boolean addToProtocol(ProtocolKey key, ModuleInstance module)
      Add a running module into the protocol hash table. Return true if the module was added successfully, false if it couldn't be added. In the latter case the module should be shutdown if its reference count is 0.
    • inService

      boolean inService(Object instance)
    • getKey

      public ProtocolKey getKey()
    • getServiceType

      PersistentService getServiceType()
    • stop

      private static void stop(Object instance)