Exemplo n.º 1
0
 /**
  * Changes the number stored at the given key, i.e. adds some value. Assumes <tt>0</tt> if no
  * value exists at <tt>key</tt>.
  *
  * @param reqs the request list containing a single add_on_nr operation
  * @throws ConnectionException if the connection is not active or a communication error occurs or
  *     an exit signal was received or the remote node sends a message containing an invalid cookie
  * @throws TimeoutException if a timeout occurred while trying to write the value
  * @throws NotANumberException if the previously stored value was no number
  * @throws UnknownException if any other error occurs
  * @see #addOnNr(OtpErlangObject, OtpErlangLong)
  * @see #addOnNr(OtpErlangObject, OtpErlangDouble)
  * @since 3.9
  */
 protected void addOnNr_(final RequestList reqs)
     throws ConnectionException, TimeoutException, NotANumberException, UnknownException {
   try {
     final ResultList result = req_list(reqs);
     if (result.size() == 1) {
       result.processAddOnNrAt(0);
     } else {
       throw new UnknownException(result.getResults());
     }
   } catch (final AbortException e) {
     // should not occur (we did not commit anything)
     throw new UnknownException(e);
   }
 }