Documentation of 'org.apache.derby.impl.services.monitor.FileMonitor' Java class
FileMonitor
org.apache.derby.impl.services.monitor

Class FileMonitor

  • All Implemented Interfaces:
    BundleFinder, ModuleFactory


    public final class FileMonitor
    extends java.lang.Object
    Implementation of the monitor that uses the class loader that the its was loaded in for all class loading.
    • Constructor Summary

      Constructors 
      Constructor and Description
      FileMonitor() 
      FileMonitor(java.util.Properties properties, java.io.PrintWriter log) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      InstanceGetter classFromIdentifier(int fmtId)
      Obtain a class that supports the given identifier.
      java.lang.Object createPersistentService(java.lang.String factoryInterface, java.lang.String name, java.util.Properties properties)
      Create a persistent service.
      java.lang.Object findModule(java.lang.Object serviceModule, java.lang.String factoryInterface, java.lang.String identifier)
      Find the module in the system with the given module protocol, protocolVersion and identifier.
      java.lang.Object findService(java.lang.String factoryInterface, java.lang.String serviceName)
      Find a service.
      java.util.Properties getApplicationProperties()
      Return the application set of properties which correspond to the set of properties in the file derby.properties.
      java.util.ResourceBundle getBundle(java.lang.String messageId)
      Get the locale from the ContextManager and then find the bundle based upon that locale.
      java.lang.String getCanonicalServiceName(java.lang.String userSpecifiedName)
      Canonicalize a service name, mapping different user-specifications of a database name onto a single, standard name.
      java.lang.Thread getDaemonThread(java.lang.Runnable task, java.lang.String name, boolean setMinPriority)
      Get a newly created background thread.
      ProductVersionHolder getEngineVersion() 
      java.lang.Object getEnvironment()
      Return the environment object that this system was booted in.
      java.lang.String getJVMProperty(java.lang.String key)
      Return a property from the JVM's system set.
      java.util.Locale getLocale(java.lang.Object serviceModule)
      Return the locale of the service that the passed in module lives in.
      java.util.Locale getLocaleFromString(java.lang.String localeDescription)
      Translate a string of the form ll[_CC[_variant]] to a Locale.
      java.lang.String[] getServiceList(java.lang.String protocol)
      Return an array of the service identifiers that are running and implement the passed in protocol (java interface class name).
      java.lang.String getServiceName(java.lang.Object serviceModule)
      Return the name of the service that the passed in module lives in.
      PersistentService getServiceProvider(java.lang.String subSubProtocol)
      Return the PersistentService for a subsubprotocol.
      PersistentService getServiceType(java.lang.Object serviceModule)
      Return the PersistentService object for a service.
      InfoStreams getSystemStreams()
      Get the defined default system streams object.
      TimerFactory getTimerFactory()
      Returns the Timer factory for this system.
      UUIDFactory getUUIDFactory()
      Return the UUID factory for this system.
      java.lang.Object newInstanceFromIdentifier(int identifier)
      Obtain an new instance of a class that supports the given identifier.
      void removePersistentService(java.lang.String name)
      Removes a PersistentService.
      java.util.Locale setLocale(java.lang.Object serviceModule, java.lang.String userDefinedLocale)
      Set the locale for the service *outside* of boot time.
      java.util.Locale setLocale(java.util.Properties serviceProperties, java.lang.String userDefinedLocale)
      Set the locale for the service at boot time.
      void setThreadPriority(int priority)
      Set the priority of the current thread.
      void shutdown()
      Shut down the complete system that was started by this Monitor.
      void shutdown(java.lang.Object serviceModule)
      Shut down a service that was started by this Monitor.
      java.lang.Object startModule(boolean create, java.lang.Object serviceModule, java.lang.String factoryInterface, java.lang.String identifier, java.util.Properties properties)
      Start a module.
      java.lang.Object startNonPersistentService(java.lang.String factoryInterface, java.lang.String serviceName, java.util.Properties properties)
      Start a non-persistent service.
      boolean startPersistentService(java.lang.String name, java.util.Properties properties)
      Start a peristent service.
      void startServices(java.util.Properties properties, boolean bootAll)
      Start all services identified by derby.service.* in the property set.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileMonitor

        public FileMonitor()
      • FileMonitor

        public FileMonitor(java.util.Properties properties,
                           java.io.PrintWriter log)
    • Method Detail

      • getEnvironment

        public java.lang.Object getEnvironment()
        Description copied from interface: ModuleFactory
        Return the environment object that this system was booted in. This is a free form object that is set by the method the system is booted. For example when running in a Marimba system it is set to the maribma application context. In most environments it will be set to a java.io.File object representing the system home directory. Code that call this method usualy have predefined knowledge of the type of the returned object, e.g. Marimba store code knows that this will be set to a marimba application context.
      • getJVMProperty

        public final java.lang.String getJVMProperty(java.lang.String key)
        Description copied from interface: ModuleFactory
        Return a property from the JVM's system set. In a Java2 environment this will be executed as a privileged block if and only if the property starts with 'derby.'. If a SecurityException occurs, null is returned.
      • getDaemonThread

        public final java.lang.Thread getDaemonThread(java.lang.Runnable task,
                                                      java.lang.String name,
                                                      boolean setMinPriority)
        Description copied from interface: ModuleFactory
        Get a newly created background thread. The thread is set to be a daemon but is not started.
        Specified by:
        getDaemonThread in interface ModuleFactory
      • setThreadPriority

        public final void setThreadPriority(int priority)
        Description copied from interface: ModuleFactory
        Set the priority of the current thread. If the current thread was not returned by getDaemonThread() then no action is taken.
        Specified by:
        setThreadPriority in interface ModuleFactory
      • shutdown

        public void shutdown()
        Description copied from interface: ModuleFactory
        Shut down the complete system that was started by this Monitor. Will cause the stop() method to be called on each loaded module.
        Specified by:
        shutdown in interface ModuleFactory
      • shutdown

        public void shutdown(java.lang.Object serviceModule)
        Shut down a service that was started by this Monitor. Will cause the stop() method to be called on each loaded module.
        Specified by:
        shutdown in interface ModuleFactory
      • getLocale

        public java.util.Locale getLocale(java.lang.Object serviceModule)
        Description copied from interface: ModuleFactory
        Return the locale of the service that the passed in module lives in. Will return null if no-locale has been defined.
        Specified by:
        getLocale in interface ModuleFactory
      • getLocaleFromString

        public java.util.Locale getLocaleFromString(java.lang.String localeDescription)
                                             throws StandardException
        Description copied from interface: ModuleFactory
        Translate a string of the form ll[_CC[_variant]] to a Locale. This is in the Monitor because we want this translation to be in only one place in the code.
        Specified by:
        getLocaleFromString in interface ModuleFactory
        Throws:
        StandardException
      • getServiceName

        public java.lang.String getServiceName(java.lang.Object serviceModule)
        Return the name of the service that the passed in module lives in.
        Specified by:
        getServiceName in interface ModuleFactory
      • setLocale

        public java.util.Locale setLocale(java.lang.Object serviceModule,
                                          java.lang.String userDefinedLocale)
                                   throws StandardException
        Set the locale for the service *outside* of boot time.
        Specified by:
        setLocale in interface ModuleFactory
        userDefinedLocale - A String in the form xx_YY, where xx is the language code and YY is the country code.
        Returns:
        The new Locale for the service
        Throws:
        StandardException - Standard Derby error.
      • setLocale

        public java.util.Locale setLocale(java.util.Properties serviceProperties,
                                          java.lang.String userDefinedLocale)
                                   throws StandardException
        Set the locale for the service at boot time. The passed in properties must be the one passed to the boot method.
        Specified by:
        setLocale in interface ModuleFactory
        Throws:
        StandardException - Standard Derby error.
      • getServiceType

        public PersistentService getServiceType(java.lang.Object serviceModule)
        Return the PersistentService object for a service. Will return null if the service does not exist.
        Specified by:
        getServiceType in interface ModuleFactory
      • findModule

        public java.lang.Object findModule(java.lang.Object serviceModule,
                                           java.lang.String factoryInterface,
                                           java.lang.String identifier)
        Description copied from interface: ModuleFactory
        Find the module in the system with the given module protocol, protocolVersion and identifier.
        Specified by:
        findModule in interface ModuleFactory
        Returns:
        The module instance if found, or null.
      • newInstanceFromIdentifier

        public java.lang.Object newInstanceFromIdentifier(int identifier)
                                                   throws StandardException
        Obtain an new instance of a class that supports the given identifier.
        Specified by:
        newInstanceFromIdentifier in interface ModuleFactory
        Parameters:
        identifier - identifer to associate with class
        Returns:
        a reference to a newly created object or null if a matching class cannot be found.
        Throws:
        StandardException - See Monitor.newInstanceFromIdentifier
      • getApplicationProperties

        public java.util.Properties getApplicationProperties()
        Description copied from interface: ModuleFactory
        Return the application set of properties which correspond to the set of properties in the file derby.properties.
        Specified by:
        getApplicationProperties in interface ModuleFactory
      • getServiceList

        public java.lang.String[] getServiceList(java.lang.String protocol)
        Return an array of the service identifiers that are running and implement the passed in protocol (java interface class name).
        Specified by:
        getServiceList in interface ModuleFactory
        Returns:
        The list of service names, if no services exist that implement the protocol an array with zero elements is returned.
        See Also:
        ModuleFactory.getServiceList(java.lang.String)
      • startServices

        public void startServices(java.util.Properties properties,
                                  boolean bootAll)
        Description copied from interface: ModuleFactory
        Start all services identified by derby.service.* in the property set. If bootAll is true the services that are persistent will be booted.
        Specified by:
        startServices in interface ModuleFactory
      • getUUIDFactory

        public UUIDFactory getUUIDFactory()
        Return the UUID factory for this system. Returns null if there isn't one. See com.ibm.db2j.system.System
        Specified by:
        getUUIDFactory in interface ModuleFactory
      • getBundle

        public java.util.ResourceBundle getBundle(java.lang.String messageId)
        Get the locale from the ContextManager and then find the bundle based upon that locale.
        Specified by:
        getBundle in interface BundleFinder
        Parameters:
        messageId - Message being searched for.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.