package ink.wgink.database.manager.entity;

import java.sql.Connection;

/**
 * @ClassName: ActiveConnection
 * @Description: 激活的连接
 * @Author: wanggeng
 * @Date: 2021/10/27 4:40 下午
 * @Version: 1.0
 */
public class ActiveConnection {

    private String id;
    private Connection connection;
    private long lastUpdateTime;

    public ActiveConnection(String id, Connection connection) {
        this.id = id;
        this.connection = connection;
        this.lastUpdateTime = System.currentTimeMillis();
    }

    public String getId() {
        return id == null ? "" : id.trim();
    }

    public void setId(String id) {
        this.id = id;
    }

    public Connection getConnection() {
        return connection;
    }

    public void setConnection(Connection connection) {
        this.connection = connection;
    }

    public long getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(long lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }
}
