You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2015/07/09 08:31:06 UTC

[jira] [Created] (IGNITE-1108) Additional lifecycle callbacks in PluginProvider interface.

Vladimir Ozerov created IGNITE-1108:
---------------------------------------

             Summary: Additional lifecycle callbacks in PluginProvider interface.
                 Key: IGNITE-1108
                 URL: https://issues.apache.org/jira/browse/IGNITE-1108
             Project: Ignite
          Issue Type: Task
          Components: general
    Affects Versions: 1.1.4
            Reporter: Vladimir Ozerov
            Priority: Critical
             Fix For: sprint-7


Currently plugins are started at the very end of start process, and they are stopped before all other components.

This is a problem because sometimes we need to stop plugin AFTER all other components. not BEFORE. E.g. consider a plugin which provides an environment for custom cache store, and this store has "write-behind" enabled. In this case we will stop plugin before write-behind store flushed all data what leads to unexpected behavior.

It seems that we must provide more callbacks so that plugins could be notified both before and after all other components are started/stopped.

Proposed design:
1) Start:
- PluginProvider.onBeforeStart() - called from IgnitePluginProcessor.start();
- PluginProvider.start() - already exists, unchanged;
- PluginProvider.onAfterStart() - just rename onIgniteStart() for consistency with onBeforeStart();

2) Stop procedure is mirrored from start: onBeforeStop(), stop(), onAfterStop().

3) Introduce PluginProviderAdapter where methods will be no-op. This way user plugins will continue compile in case of further changes to PluginProvider interfaces provided that method names are unchanged.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)