Top Description Fields Constructors Methods
org.apache.derby.impl.services.monitor

public final Class FileMonitor

extends BaseMonitor
Class Inheritance
Imports
java.io.File, .FileInputStream, .IOException, .InputStream, .PrintWriter, java.util.HashMap, .Map, .Properties, org.apache.derby.shared.common.reference.Property, .MessageId, org.apache.derby.shared.common.i18n.MessageService, org.apache.derby.shared.common.info.ProductGenusNames, .ProductVersionHolder, org.apache.derby.iapi.services.io.FileUtil

Implementation of the monitor that uses the class loader that the its was loaded in for all class loading.

Field Summary

Modifier and TypeField and Description
private ProductVersionHolder
private File
private static final Map<String, Void>
Inherited from org.apache.derby.impl.services.monitor.BaseMonitor:
applicationPropertiesbootPropertiesdaemonGroupinShutdownreportOn

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
pack-priv final InputStream
applicationPropertiesStream()

Implements abstract org.apache.derby.impl.services.monitor.BaseMonitor.applicationPropertiesStream.

Get InputStream for application properties file Returns nul if it does not exist.

private ThreadGroup

Returns:

the thread group "derby.daemons"
createDaemonGroup
()

Create a ThreadGroup and set the daemon property to make sure the group is destroyed and garbage collected when all its members have finished (i.e., either when the driver is unloaded, or when the last database is shut down).

public final synchronized Thread
getDaemonThread(final Runnable task, final String name, final boolean setMinPriority)

Overrides org.apache.derby.impl.services.monitor.BaseMonitor.getDaemonThread.

Implements org.apache.derby.iapi.services.monitor.ModuleFactory.getDaemonThread.

Warnings are suppressed because ThreadGroup.setDaemon() was slated for removal by Open JDK build 16-ea+26-1764.

pack-priv final Properties
getDefaultModuleProperties()

Overrides org.apache.derby.impl.services.monitor.BaseMonitor.getDefaultModuleProperties.

Get the complete set of module properties by loading in contents of all the org/apache/derby/modules.properties files.

public final ProductVersionHolder
public Object
getEnvironment()

Implements org.apache.derby.iapi.services.monitor.ModuleFactory.getEnvironment.

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.

public final String
getJVMProperty(final String key)

Implements org.apache.derby.iapi.services.monitor.ModuleFactory.getJVMProperty.

Return a property from the JVM's system set.

pack-priv final boolean
initialize(final boolean lite)

Implements abstract org.apache.derby.impl.services.monitor.BaseMonitor.initialize.

Initialize the system.

private InputStream
private String
PBgetJVMProperty(String key)

SECURITY WARNING.

private boolean
PBinitialize(boolean lite)

SECURITY WARNING.

Inherited from org.apache.derby.impl.services.monitor.BaseMonitor:
bootbootProviderServicesbootServicecanSupportclassFromIdentifiercreatePersistentServicedumpPropertiesfindModulefindProviderForCreatefindServicegetApplicationPropertiesgetBundlegetCanonicalServiceNamegetLocalegetLocaleFromStringgetServiceListgetServiceNamegetServiceProvidergetServiceTypegetSystemStreamsgetTimerFactorygetUUIDFactoryisDaemonThreadloadInstancenewInstanceFromIdentifierreadApplicationPropertiesremovePersistentServiceremoveRuntimePropertiesreportreportExceptionrunWithStatesetLocalesetLocaleshutdownshutdownstartModulestartNonPersistentServicestartPersistentServicestartProviderServicestartServices

Field Detail

engineVersionback to summary
private ProductVersionHolder engineVersion
homeback to summary
private File home
securityPropertiesback to summary
private static final Map<String, Void> securityProperties

Constructor Detail

FileMonitorback to summary
public FileMonitor()
FileMonitorback to summary
public FileMonitor(Properties properties, PrintWriter log)

Method Detail

applicationPropertiesStreamback to summary
pack-priv final InputStream applicationPropertiesStream() throws IOException

Implements abstract org.apache.derby.impl.services.monitor.BaseMonitor.applicationPropertiesStream.

Doc from org.apache.derby.impl.services.monitor.BaseMonitor.applicationPropertiesStream.

Get InputStream for application properties file Returns nul if it does not exist.

createDaemonGroupback to summary
private ThreadGroup createDaemonGroup()

Create a ThreadGroup and set the daemon property to make sure the group is destroyed and garbage collected when all its members have finished (i.e., either when the driver is unloaded, or when the last database is shut down). Warnings are suppressed because ThreadGroup.setDaemon() was slated for removal by Open JDK build 16-ea+26-1764. See https://issues.apache.org/jira/browse/DERBY-7094

Returns:ThreadGroup

the thread group "derby.daemons"

Annotations
@SuppressWarnings:removal
getDaemonThreadback to summary
public final synchronized Thread getDaemonThread(final Runnable task, final String name, final boolean setMinPriority)

Overrides org.apache.derby.impl.services.monitor.BaseMonitor.getDaemonThread.

Implements org.apache.derby.iapi.services.monitor.ModuleFactory.getDaemonThread.

Warnings are suppressed because ThreadGroup.setDaemon() was slated for removal by Open JDK build 16-ea+26-1764. See https://issues.apache.org/jira/browse/DERBY-7094

Annotations
@SuppressWarnings:removal
getDefaultModulePropertiesback to summary
pack-priv final Properties getDefaultModuleProperties()

Overrides org.apache.derby.impl.services.monitor.BaseMonitor.getDefaultModuleProperties.

Doc from org.apache.derby.impl.services.monitor.BaseMonitor.getDefaultModuleProperties.

Get the complete set of module properties by loading in contents of all the org/apache/derby/modules.properties files. This must be executed in a privileged block otherwise when running in a security manager environment no properties will be returned.

getEngineVersionback to summary
public final ProductVersionHolder getEngineVersion()

Implements org.apache.derby.iapi.services.monitor.ModuleFactory.getEngineVersion.

getEnvironmentback to summary
public Object getEnvironment()

Implements org.apache.derby.iapi.services.monitor.ModuleFactory.getEnvironment.

Doc from org.apache.derby.iapi.services.monitor.ModuleFactory.getEnvironment.

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.

getJVMPropertyback to summary
public final String getJVMProperty(final String key)

Implements org.apache.derby.iapi.services.monitor.ModuleFactory.getJVMProperty.

Doc from org.apache.derby.iapi.services.monitor.ModuleFactory.getJVMProperty.

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.'.

initializeback to summary
pack-priv final boolean initialize(final boolean lite)

Implements abstract org.apache.derby.impl.services.monitor.BaseMonitor.initialize.

Initialize the system.

PBapplicationPropertiesStreamback to summary
private InputStream PBapplicationPropertiesStream() throws IOException
PBgetJVMPropertyback to summary
private String PBgetJVMProperty(String key)

SECURITY WARNING. This method is run in a privileged block in a Java 2 environment. 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.'.

PBinitializeback to summary
private boolean PBinitialize(boolean lite)

SECURITY WARNING. This method is run in a privileged block in a Java 2 environment. Set the system home directory. Returns false if it couldn't for some reason.