
io.lightlink.servlet.debug.ObjectPoolElement Maven / Gradle / Ivy
package io.lightlink.servlet.debug;
/*
* #%L
* lightlink-core
* %%
* Copyright (C) 2015 Vitaliy Shevchuk
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
public class ObjectPoolElement {
private long lastAccess;
private long generation;
private int objectId;
private Object object;
ObjectPoolElement(long generation, int objectId, Object object) {
this.generation = generation;
this.objectId = objectId;
this.object = object;
}
public long getLastAccess() {
return lastAccess;
}
public void setLastAccess(long lastAccess) {
this.lastAccess = lastAccess;
}
public long getGeneration() {
return generation;
}
public void setGeneration(long generation) {
this.generation = generation;
}
public int getObjectId() {
return objectId;
}
public void setObjectId(int objectId) {
this.objectId = objectId;
}
public Object getObject() {
lastAccess = System.currentTimeMillis();
return object;
}
public void setObject(Object object) {
lastAccess = System.currentTimeMillis();
this.object = object;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy