com.haiwanwan.common.objectpool.Poolable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fast-object-pool Show documentation
Show all versions of fast-object-pool Show documentation
An extremely fast object pool with zero dependencies
package com.haiwanwan.common.objectpool;
/**
* @author Daniel
*/
public class Poolable {
private final T object;
private final int partition;
private long lastAccessTs;
public Poolable(T t, int partition) {
this.object = t;
this.partition = partition;
}
public T getObject() {
return object;
}
public int getPartition() {
return partition;
}
public long getLastAccessTs() {
return lastAccessTs;
}
public void setLastAccessTs(long lastAccessTs) {
this.lastAccessTs = lastAccessTs;
}
}