class RpcTaskScanner extends AbstractLifeCycle {

    private static final Logger      logger = BoltLoggerFactory.getLogger("RpcRemoting");

    private final List<Scannable>    scanList;

    private ScheduledExecutorService scheduledService;

    public RpcTaskScanner() {
        this.scanList = new LinkedList<Scannable>();
    }

    @Override
    public void startup() throws LifeCycleException {
        super.startup();

        scheduledService = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory(
            "RpcTaskScannerThread", true));
        scheduledService.scheduleWithFixedDelay(new Runnable() {

            @Override
            public void run() {<FILL_FUNCTION_BODY>}

        }, 10000, 10000, TimeUnit.MILLISECONDS);
    }

    @Override
    public void shutdown() throws LifeCycleException {
        super.shutdown();

        scheduledService.shutdown();
    }

    /**
     * Use {@link RpcTaskScanner#startup()} instead
     */
    @Deprecated
    public void start() {
        startup();
    }

    /**
     * Add scan target.
     */
    public void add(Scannable target) {
        scanList.add(target);
    }

}

                for (Scannable scanned : scanList) {
                    try {
                        scanned.scan();
                    } catch (Throwable t) {
                        logger.error("Exception caught when scannings.", t);
                    }
                }
            
<methods>public non-sealed void <init>() ,public boolean isStarted() ,public void shutdown() throws com.alipay.remoting.LifeCycleException,public void startup() throws com.alipay.remoting.LifeCycleException<variables>private final java.util.concurrent.atomic.AtomicBoolean isStarted