public class EquinoxRegistryStrategy extends RegistryStrategyOSGI
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OPTION_DEBUG |
static java.lang.String |
OPTION_DEBUG_EVENTS |
static java.lang.String |
PLUGIN_NAME |
DEBUG, DEBUG_REGISTRY_EVENTS| Constructor and Description |
|---|
EquinoxRegistryStrategy(java.io.File[] theStorageDir,
boolean[] cacheReadOnly,
java.lang.Object key) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
debug()
Override this method to specify debug requirements to the registry.
|
boolean |
debugRegistryEvents()
Override this method to specify debug requirements for the registry event processing.
|
long |
getContainerTimestamp()
This method is called as a part of the registry cache validation.
|
void |
log(IStatus status)
Override this method to provide customized logging functionality
to the registry.
|
void |
scheduleChangeEvent(java.lang.Object[] listeners,
java.util.Map<java.lang.String,?> deltas,
java.lang.Object registry)
This method will attempt to use Eclipse Jobs mechanism to schedule registry events.
|
cacheLazyLoading, cacheUse, checkContributionsTimestamp, createExecutableExtension, getContributionsTimestamp, getExtendedTimestamp, getLocale, getXMLParser, onStart, onStop, translate, translategetLocationsLength, getStorage, isCacheReadOnly, onStart, processChangeEventpublic static final java.lang.String PLUGIN_NAME
public static final java.lang.String OPTION_DEBUG
public static final java.lang.String OPTION_DEBUG_EVENTS
public EquinoxRegistryStrategy(java.io.File[] theStorageDir,
boolean[] cacheReadOnly,
java.lang.Object key)
public boolean debug()
RegistryStrategyfalse indicating that debug functionality
is turned off.
Note that in a general case the extension registry plug-in doesn't depend on OSGI and therefore cannot use Eclipse .options files to discover debug options.
debug in class RegistryStrategytrue if debug logging and validation should be performed and
false otherwisepublic boolean debugRegistryEvents()
RegistryStrategyfalse indicating that
debug of the registry events is turned off.
Note that in a general case the extension registry plug-in doesn't depend on OSGI and therefore cannot use Eclipse .options files to discover debug options.
debugRegistryEvents in class RegistryStrategytrue if debug logging and validation of the registry events
should be performed and false otherwisepublic final void log(IStatus status)
RegistryStrategy
This method writes a message to System.out
in the following format:
[Error|Warning|Log]: Main error message
[Error|Warning|Log]: Child error message 1
...
[Error|Warning|Log]: Child error message N
log in class RegistryStrategystatus - the status to logpublic long getContainerTimestamp()
RegistryStrategyThe method produces a number that corresponds to the current state of the data stored by the container. Increment the stamp if the data stored in the container has been updated so that the data cached by the registry is no longer valid. For instance, in Eclipse addition or removal of a bundle results in the number returned by this method being incremented. As a result, if a bundle that contributed plugin.xml into the extension registry was modified, the state doesn't match the state stored in the registry cache. In this case the cache content becomes invalid and the registry needs to be re-created from the original data.
Generally, treat this number as a hash code for the data stored in the registry. It stays the same as long as the registry content is not changing. It becomes a different number as the registry content gets modified.
Return 0 to indicate that state verification is not required.
getContainerTimestamp in class RegistryStrategypublic final void scheduleChangeEvent(java.lang.Object[] listeners,
java.util.Map<java.lang.String,?> deltas,
java.lang.Object registry)
scheduleChangeEvent in class RegistryStrategylisteners - the list of active listeners (thread safe); may not be nulldeltas - the registry deltas (thread safe); may not be nullregistry - the extension registry (NOT thread safe); may not be null