Class TopService
java.lang.Object
org.apache.derby.impl.services.monitor.TopService
A description of an instance of a module.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
(package private) ProtocolKey
The idenity of this service, note that it may not be active yet.(package private) Vector
<ModuleInstance> (package private) BaseMonitor
(package private) Hashtable
<ProtocolKey, ModuleInstance> List of protocols.(package private) Locale
(package private) PersistentService
The type of service this was created by.(package private) ModuleInstance
The top module instance -
Constructor Summary
ConstructorsConstructorDescriptionTopService
(BaseMonitor monitor) TopService
(BaseMonitor monitor, ProtocolKey key, PersistentService serviceType, Locale serviceLocale) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
addToProtocol
(ProtocolKey key, ModuleInstance module) Add a running module into the protocol hash table.(package private) Object
bootModule
(boolean create, Object service, ProtocolKey key, Properties properties) Boot a module, performs three steps.(package private) 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.private ModuleInstance
findModuleInstance
(Object instance) Find aModuleInstance
object whosegetInstance()
method returns the object specified by theinstance
parameter.getKey()
(package private) Object
(package private) PersistentService
(package private) boolean
(package private) boolean
(package private) boolean
isActiveService
(ProtocolKey otherKey) (package private) boolean
isPotentialService
(ProtocolKey otherKey) (package private) void
setTopModule
(Object instance) (package private) boolean
shutdown()
If the service is already beign shutdown we return false.private static void
-
Field Details
-
key
ProtocolKey keyThe idenity of this service, note that it may not be active yet. -
topModule
ModuleInstance topModuleThe top module instance -
protocolTable
Hashtable<ProtocolKey,ModuleInstance> protocolTableList of protocols. -
moduleInstances
Vector<ModuleInstance> moduleInstances -
monitor
BaseMonitor monitor -
inShutdown
boolean inShutdown -
serviceType
PersistentService serviceTypeThe type of service this was created by. If null then this is a non-persistent service. -
serviceLocale
Locale serviceLocale
-
-
Constructor Details
-
TopService
TopService(BaseMonitor monitor) -
TopService
TopService(BaseMonitor monitor, ProtocolKey key, PersistentService serviceType, Locale serviceLocale)
-
-
Method Details
-
setTopModule
-
getService
Object getService() -
isPotentialService
-
isActiveService
boolean isActiveService() -
isActiveService
-
findModule
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
Find aModuleInstance
object whosegetInstance()
method returns the object specified by theinstance
parameter.- Parameters:
instance
- the instance to look for- Returns:
- a
ModuleInstance
object, ornull
if no match was found
-
bootModule
Object bootModule(boolean create, Object service, ProtocolKey key, Properties properties) throws StandardException Boot a module, performs three steps.- Look for an existing module in the protocol table
- Look for a module in the implementation table that handles this protocol
- Create an instance that handles this protocol.
- Throws:
StandardException
-
shutdown
boolean shutdown()If the service is already beign shutdown we return false. -
addToProtocol
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
-
getKey
-
getServiceType
PersistentService getServiceType() -
stop
-