Code example for AtomicLong

Methods: getAndIncrement

0
    ScriptEngine engine;
 
    ScriptSession(ScriptEngine engine, String extension) {
        this.engine = engine;
        this.extension = extension;
        this.id = IDGEN.getAndIncrement();
    } 
 
    public long getId() { 
        return id;
    } 
 
    public String getExtension() {
        return extension;
    } 
 
    public String getEngineName() {
        return engine.getFactory().getEngineName();
    } 
 
    public ScriptEngine getEngine() {