Examples of ConnectionPool


Examples of org.sd_network.db.ConnectionPool

     */
    public static final Sector getLastSector(String fileID) {
        if (fileID == null)
            throw new NullPointerException("fileID.");

        ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        Connection con = pool.engageConnection(10);
        PreparedStatement stmt = null;
        try {
            stmt = con.prepareStatement(
                    "SELECT sector_id, file_id, seq_num, size " +
                    "FROM " +
View Full Code Here

Examples of org.sd_network.db.ConnectionPool

     */
    public static final long getFileSize(String fileID) {
        if (fileID == null)
            throw new NullPointerException("fileID.");

        ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        Connection con = pool.engageConnection(10);
        PreparedStatement stmt = null;
        try {
            stmt = con.prepareStatement(
                    "SELECT sum(size) as total_bytes " +
                    "FROM sector " +
View Full Code Here

Examples of org.sd_network.db.ConnectionPool

     */
    public static final long getTotalSectorNumber(String fileID) {
        if (fileID == null)
            throw new NullPointerException("fileID");

        ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        Connection con = pool.engageConnection(10);
        PreparedStatement stmt = null;
        try {
            stmt = con.prepareStatement(
                    "SELECT count(*) as total_sector_number " +
                    "FROM sector " +
View Full Code Here

Examples of org.sd_network.db.ConnectionPool

     */
    public static final String[] getSectorIDs(String fileID) {
        if (fileID == null)
            throw new NullPointerException("fileID");

        ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        Connection con = pool.engageConnection(10);
        PreparedStatement stmt = null;
        try {
            stmt = con.prepareStatement(
                    "SELECT sector_id FROM sector " +
                    "WHERE file_id=? " +
View Full Code Here

Examples of org.sd_network.db.ConnectionPool

     *
     * @throws  DBException
     *          �f�[�^�x�[�X�A�N�Z�X���ɃG���[�����������ꍇ�ɃX���[���܂��B
     */
    public static final long getUsedBytes() {
        ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        Connection con = pool.engageConnection(10);
        PreparedStatement stmt = null;
        try {
            stmt = con.prepareStatement(
                    "SELECT sum(size) as used_bytes FROM sector");
            ResultSet rs = stmt.executeQuery();
View Full Code Here

Examples of org.sd_network.db.ConnectionPool

     */
    private static final boolean exists(String sectorID) {
        if (sectorID == null)
            throw new NullPointerException("sectorID.");

        ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        Connection con = pool.engageConnection(10);
        PreparedStatement stmt = null;
        try {
            stmt = con.prepareStatement(
                    "SELECT sector_id FROM sector WHERE sector_id=?");
            stmt.setString(1, sectorID);
View Full Code Here

Examples of org.sd_network.db.ConnectionPool

        if (fileID == null || fileID.trim().length() == 0)
            throw new IllegalArgumentException("fileID is empty.");
        if (ownerID == null || ownerID.trim().length() == 0)
            throw new IllegalArgumentException("ownerID is empty.");

        ConnectionPool pool = ConnectionPool.getInstance("vfs");
        Connection con = pool.engageConnection(10);
        try {
            PreparedStatement stmt = con.prepareStatement(
                    "SELECT count(*) as number_of_child " +
                    "FROM vfs_file " +
                    "WHERE parent_file_id=? AND owner_id=?");
View Full Code Here

Examples of org.sd_network.db.ConnectionPool

        if (fileID == null || fileID.trim().length() == 0)
            throw new IllegalArgumentException("fileID is empty.");
        if (ownerID == null || ownerID.trim().length() == 0)
            throw new IllegalArgumentException("ownerID is empty.");

        ConnectionPool pool = ConnectionPool.getInstance("vfs");
        Connection con = pool.engageConnection(10);
        try {
            PreparedStatement stmt = con.prepareStatement(
                    "SELECT file_id, name, type_id, parent_file_id, size, " +
                    " owner_id, created " +
                    "FROM vfs_file " +
View Full Code Here

Examples of org.serviceconnector.net.connection.ConnectionPool

   * @param remoteNodeConfiguration
   *            the remote node configuration
   */
  public Requester(RemoteNodeConfiguration remoteNodeConfiguration) {
    this.remoteNodeConfiguration = remoteNodeConfiguration;
    this.connectionPool = new ConnectionPool(remoteNodeConfiguration.getHost(), remoteNodeConfiguration.getPort(),
        remoteNodeConfiguration.getConnectionType(), remoteNodeConfiguration.getKeepAliveIntervalSeconds(), AppContext
            .getBasicConfiguration().getKeepAliveOTIMillis());
    this.connectionPool.setMaxConnections(remoteNodeConfiguration.getMaxPoolSize());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.