Code example for ScheduledExecutorService

Methods: scheduleWithFixedDelay

0
    } 
 
    @Subscribe 
    public void start(Start _)
    { 
        this.cron.scheduleWithFixedDelay(new ScanAgents(), 0, 10, TimeUnit.SECONDS);
    } 
 
    public void remove(UUID id)
    { 
        AgentDescription ad = agents.remove(id);
        Link self = find(ad.getLinks(), beanPropertyEquals("rel", "self"));
        agentUris.remove(self.getUri());
 
    } 
 
    private class ScanAgents implements Runnable
    { 
        @Override 
        public void run() 
        {