Package com.sun.sgs.app

Examples of com.sun.sgs.app.ObjectNotFoundException


    {
  TxnInfo txnInfo = checkTxn(txn);
  byte[] result = oidsDb.get(
      txnInfo.dbTxn, DataEncoding.encodeLong(oid), forUpdate);
  if (result == null || isPlaceholderValue(result)) {
      throw new ObjectNotFoundException("Object not found: " + oid);
  }
  return decodeValue(result);
    }
View Full Code Here


    protected void removeObjectInternal(Transaction txn, long oid) {
  TxnInfo txnInfo = checkTxn(txn);
  byte[] key = DataEncoding.encodeLong(oid);
  boolean found = oidsDb.delete(txnInfo.dbTxn, key);
  if (!found) {
      throw new ObjectNotFoundException("Object not found: " + oid);
  }
  txnInfo.modified = true;
    }
View Full Code Here

     *    current transaction
     */
     private NodeImpl getForUpdate(DataService dataService) {
  NodeImpl nodeImpl = getNodeForUpdate(dataService, id);
  if (nodeImpl == null) {
      throw new ObjectNotFoundException("node is removed");
  }
  return nodeImpl;
    }
View Full Code Here

  assert object instanceof ManagedObject
      : "Object is not a managed object";
  ManagedReferenceImpl<T> ref = Objects.uncheckedCast(
      context.refs.find(object));
  if (ref != null && ref.isRemoved()) {
      throw new ObjectNotFoundException("Object has been removed");
  }
  return ref;
     }
View Full Code Here

      context.refs.find(object));
  if (ref == null) {
      ref = new ManagedReferenceImpl<T>(context, object);
      context.refs.add(ref);
  } else if (ref.isRemoved()) {
      throw new ObjectNotFoundException("Object has been removed");
  }
  if (logger.isLoggable(Level.FINEST)) {
      logger.log(Level.FINEST,
           "getReference tid:{0,number,#}, type:{1}" +
           " returns oid:{2,number,#}",
View Full Code Here

  ManagedReferenceImpl<?> ref = context.refs.find(oid);
  if (ref == null) {
      ref = new ManagedReferenceImpl<ManagedObject>(context, oid);
      context.refs.add(ref);
  } else if (ref.isRemoved()) {
      throw new ObjectNotFoundException("Object has been removed");
  }
  if (logger.isLoggable(Level.FINEST)) {
      logger.log(
    Level.FINEST,
    "getReference tid:{0,number,#}, oid:{1,number,#} returns",
View Full Code Here

      throw new TransactionNotActiveException(
    "Attempt to remove a managed object when its transaction is" +
    " not active");
  case REMOVED_EMPTY:
  case REMOVED_FETCHED:
      throw new ObjectNotFoundException("The object is not found");
  default:
      throw new AssertionError();
  }
    }
View Full Code Here

      throw new TransactionNotActiveException(
    "Attempt to mark a managed object for update when its" +
    " transaction is not active");
  case REMOVED_EMPTY:
  case REMOVED_FETCHED:
      throw new ObjectNotFoundException("The object is not found");
  default:
      throw new AssertionError();
  }
    }
View Full Code Here

        "Attempt to get the object associated with a managed" +
        " reference when its transaction is not active");
    break;
      case REMOVED_EMPTY:
      case REMOVED_FETCHED:
    throw new ObjectNotFoundException("The object is not found");
      default:
    throw new AssertionError();
      }
  } catch (TransactionNotActiveException e) {
      exception = new TransactionNotActiveException(
View Full Code Here

      case NEW:
      case MODIFIED:
    break;
      case REMOVED_EMPTY:
      case REMOVED_FETCHED:
    throw new ObjectNotFoundException("The object is not found");
      default:
    throw new AssertionError();
      }
  } catch (TransactionNotActiveException e) {
      exception = new TransactionNotActiveException(
View Full Code Here

TOP

Related Classes of com.sun.sgs.app.ObjectNotFoundException

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.