CacheObject.java 658 Bytes
package com.yoho.search.cache;

public class CacheObject {

	private Object object;
	private long expireTime;// 过期秒数
	
	public CacheObject(Object object,long expireInSecond) {
		super();
		this.object = object;
		this.expireTime = System.currentTimeMillis() + expireInSecond * 1000L;
		System.out.println(System.currentTimeMillis());
		System.out.println(expireTime);
	}
	
	public Object getObject() {
		return object;
	}
	
	public long getExpireTime() {
		return expireTime;
	}
	
	
	public static void main(String[] args) {
		long current = System.currentTimeMillis();
		System.out.println(current);
		System.out.println(current + 3000 * 60);
	}

}