class PushMetricsExporterAdapter extends IgniteSpiAdapter implements MetricExporterSpi {
    /** Default export period in milliseconds. */
    public static final long DFLT_EXPORT_PERIOD = 60_000L;

    /** Metric registry. */
    protected ReadOnlyMetricManager mreg;

    /** Metric filter. */
    protected @Nullable Predicate<ReadOnlyMetricRegistry> filter;

    /** Export period. */
    private long period = DFLT_EXPORT_PERIOD;

    /** Push spi executor. */
    private ScheduledExecutorService execSvc;

    /** Export task future. */
    private ScheduledFuture<?> fut;

    /** {@inheritDoc} */
    @Override public void spiStart(@Nullable String igniteInstanceName) throws IgniteSpiException {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public void spiStop() throws IgniteSpiException {
        fut.cancel(false);

        execSvc.shutdown();
    }

    /**
     * Callback to do the export of metrics info.
     * Method will be called into some Ignite managed thread each {@link #getPeriod()} millisecond.
     */
    public abstract void export();

    /**
     * Sets period in milliseconds after {@link #export()} method should be called.
     *
     * @param period Period in milliseconds.
     */
    public void setPeriod(long period) {
        this.period = period;
    }

    /** @return Period in milliseconds after {@link #export()} method should be called. */
    public long getPeriod() {
        return period;
    }

    /** {@inheritDoc} */
    @Override public void setMetricRegistry(ReadOnlyMetricManager mreg) {
        this.mreg = mreg;
    }

    /** {@inheritDoc} */
    @Override public void setExportFilter(Predicate<ReadOnlyMetricRegistry> filter) {
        this.filter = filter;
    }

    /** {@inheritDoc} */
    @Override protected void onContextInitialized0(IgniteSpiContext spiCtx) throws IgniteSpiException {<FILL_FUNCTION_BODY>}
}

        super.onContextInitialized0(spiCtx);

        execSvc = Executors.newSingleThreadScheduledExecutor(new IgniteThreadFactory(igniteInstanceName,
            "push-metrics-exporter"));

        fut = execSvc.scheduleWithFixedDelay(() -> {
            try {
                export();
            }
            catch (Exception e) {
                log.error("Metrics export error. " +
                        "This exporter will be stopped [spiClass=" + getClass() + ",name=" + getName() + ']', e);

                throw e;
            }
        }, period, period, MILLISECONDS);
    
<methods>public long clientFailureDetectionTimeout() ,public long failureDetectionTimeout() ,public void failureDetectionTimeoutEnabled(boolean) ,public boolean failureDetectionTimeoutEnabled() ,public org.apache.ignite.internal.util.IgniteExceptionRegistry getExceptionRegistry() ,public java.lang.String getName() ,public Map<java.lang.String,java.lang.Object> getNodeAttributes() throws org.apache.ignite.spi.IgniteSpiException,public org.apache.ignite.spi.IgniteSpiContext getSpiContext() ,public org.apache.ignite.Ignite ignite() ,public Collection<java.lang.Object> injectables() ,public final void onBeforeStart() ,public void onClientDisconnected(IgniteFuture<?>) ,public void onClientReconnected(boolean) ,public final void onContextDestroyed() ,public final void onContextInitialized(org.apache.ignite.spi.IgniteSpiContext) throws org.apache.ignite.spi.IgniteSpiException,public org.apache.ignite.spi.IgniteSpiAdapter setName(java.lang.String) ,public final boolean started() <variables>private long clientFailureDetectionTimeout,private long failureDetectionTimeout,private boolean failureDetectionTimeoutEnabled,protected org.apache.ignite.Ignite ignite,protected java.lang.String igniteInstanceName,private org.apache.ignite.cluster.ClusterNode locNode,protected org.apache.ignite.IgniteLogger log,private java.lang.String name,private org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener paramsLsnr,private volatile org.apache.ignite.spi.IgniteSpiContext spiCtx,private javax.management.ObjectName spiMBean,private long startTstamp,private final java.util.concurrent.atomic.AtomicBoolean startedFlag