Package com.nirvanix.sdk.session

Examples of com.nirvanix.sdk.session.RetryException


        retry = true;
       
        // if we reach the maximum raise it as a retry exception.
        if ( retrycount++ > MAXRETRYATTEMPTS )
        {
      throw new RetryException( socketTimeout );
        }
       
        // Delay for a second on a read timeout if we are not at
        // max_retries
        Thread.sleep( this.RETRY_WAIT_SOCKET_READ_TIMEOUT );
    }
    catch ( java.net.SocketException socketEx )
    {
        // Go back to top of loop with new totalThisFile and retry
        // flag set.
        totalThisFile -= bytesRead;
        _bytesUploaded -= bytesRead;
        retry = true;
       
        // if we reach the maximum raise it as a retry exception.
        if ( retrycount++ > MAXRETRYATTEMPTS )
        {
      throw new RetryException( socketEx );
        }
       
        // Delay for a second on a read timeout if we are not at
        // max_retries
        Thread.sleep( this.RETRY_WAIT_SOCKET_READ_TIMEOUT );
    }
    catch ( Exception ex )
    {
        // There was a failure while transmitting, send out a retry
        // exception, the user should be responsible for catching
        // these
        // and handling them appropriately by resending the entire
        // file.
        // Later this will be replaced by block level retry.
       
        // Go back to top of loop with new totalThisFile and retry
        // flag set.
        totalThisFile -= bytesRead;
        _bytesUploaded -= bytesRead;
        retry = true;
       
        // if we reach the maximum raise it as a retry exception.
        if ( retrycount++ > MAXRETRYATTEMPTS )
        {
      throw new RetryException( ex );
        }
    }
      }
  }
  catch ( Exception ex )
View Full Code Here

TOP

Related Classes of com.nirvanix.sdk.session.RetryException

Copyright © 2018 www.massapicom. 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.