Package com.sun.sgs.app

Examples of com.sun.sgs.app.ObjectNotFoundException


                        (PendingTask) (service.dataService.
                        getServiceBinding(objName));
                service.cancelPeriodicTask(ptask, TaskServiceImpl.
                                                  getIdFromName(objName));
            } catch (NameNotBoundException nnbe) {
                throw new ObjectNotFoundException("task was already cancelled");
            }
        }
View Full Code Here


  txn.join(this);
  byte[] value = oids.get(oid);
  if (value != null) {
      return value;
  } else {
      throw new ObjectNotFoundException("");
  }
    }
View Full Code Here

  if (oldValue != null) {
      List<Object> txnEntry = getTxnEntry(txn);
      txnEntry.add(oid);
      txnEntry.add(oldValue);
  } else {
      throw new ObjectNotFoundException("");
  }
    }
View Full Code Here

    {
  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

                        (PendingTask) (service.dataService.
                        getServiceBinding(objName));
                service.cancelPeriodicTask(ptask, TaskServiceImpl.
                                                  getIdFromName(objName));
            } catch (NameNotBoundException nnbe) {
                throw new ObjectNotFoundException("task was already cancelled");
            }
        }
View Full Code Here

             object.toString());
      removedObjects.add(object);
  } else {
      System.err.println("removedObject: already present: " +
             object.toString());
      throw new ObjectNotFoundException(object.toString());
  }
    }
View Full Code Here

    public ManagedObject getServiceBinding(String name) {
  ManagedObject obj = get(name);
  if (obj == null) {
      throw new NameNotBoundException(name);
  } else if (removedObjectsContains(obj)) {
      throw new ObjectNotFoundException(obj.toString());
  }
  return obj;
    }
View Full Code Here

    public ManagedObject getServiceBindingForUpdate(String name) {
  throw new UnsupportedOperationException();
    }
    public void setServiceBinding(String name, Object object) {
  if (removedObjectsContains(object)) {
      throw new ObjectNotFoundException(object.toString());
  } else if (object instanceof ManagedObject &&
       object instanceof Serializable)
  {
      put(name, (ManagedObject) object);
  } else {
View Full Code Here

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