Code example for AtomicInteger

Methods: getAndIncrement

0
            AtomicInteger id = new AtomicInteger();
             
            @Override 
            public Thread newThread(Runnable runnable) {
                return new Thread(tg, runnable, 
                                  "Scheduled-" + id.getAndIncrement());
            } 
        }; 
        executor = Executors.newScheduledThreadPool(5, f);
    } 
 
    @Override 
    public void startUp(FloodlightModuleContext context) {
        // no-op 
    } 
}