/** * Expunge stale objects. */ public void expungeStaleObjects() { WeakEntry entry; while((entry = (WeakEntry)queue.poll()) !=null) { OAVInternalObjectId id = (OAVInternalObjectId)entry.getArgument(); eventhandler.objectRemoved(id.getPhantomExternalId(), getType(id.getPhantomExternalId())); objects.remove(id); types.remove(id); // System.out.println("Removed: "+id); } }
/** * Expunge stale objects. */ public void expungeStaleObjects() { WeakEntry entry; while((entry = (WeakEntry)queue.poll()) !=null) { OAVInternalObjectId id = (OAVInternalObjectId)entry.getArgument(); eventhandler.objectRemoved(id.getPhantomExternalId(), getType(id.getPhantomExternalId())); objects.remove(id); types.remove(id); // System.out.println("Removed: "+id); } }
/** * Create an object. * Creates an object identifier that can be used * to store/retrieve attribute values. * May reuse old object identifiers for performance. * @return An object identifier. */ public Object createObject(OAVObjectType type) { assert nocheck || checkTypeDefined(type); OAVInternalObjectId ret = (OAVInternalObjectId)generator.createId(this, type); objects.put(ret, new LinkedHashMap()); types.put(ret, type); //System.out.println("Adding type: "+type); // Event should be thrown once the object is used somewhere in the state? eventhandler.objectAdded(ret.getPhantomExternalId(), type, false); return ret.getWeakExternalId(); }
removeJavaObjectUsage(object, attribute, value); eventhandler.objectModified(((OAVExternalObjectId)object).getInternalId().getPhantomExternalId(), getType(object), attribute, value, null);
addJavaObjectUsage(object, attribute, value); eventhandler.objectModified(((OAVExternalObjectId)object).getInternalId().getPhantomExternalId(), getType(object), attribute, null, value);
addJavaObjectUsage(object, attribute, value); eventhandler.objectModified(((OAVExternalObjectId)object).getInternalId().getPhantomExternalId(), getType(object), attribute, null, value);
removeJavaObjectUsage(object, attribute, value); eventhandler.objectModified(((OAVExternalObjectId)object).getInternalId().getPhantomExternalId(), getType(object), attribute, value, null);
addJavaObjectUsage(object, attribute, value); eventhandler.objectModified(((OAVExternalObjectId)object).getInternalId().getPhantomExternalId(), getType(object), attribute, oldvalue, value);
addJavaObjectUsage(object, attribute, value); eventhandler.objectModified(((OAVExternalObjectId)object).getInternalId().getPhantomExternalId(), getType(object), attribute, oldvalue, value);
/** * Create an object. * Creates an object identifier that can be used * to store/retrieve attribute values. * May reuse old object identifiers for performance. * @return An object identifier. */ public Object createObject(OAVObjectType type) { assert nocheck || checkTypeDefined(type); OAVInternalObjectId ret = (OAVInternalObjectId)generator.createId(this, type); objects.put(ret, new LinkedHashMap()); types.put(ret, type); //System.out.println("Adding type: "+type); // Event should be thrown once the object is used somewhere in the state? eventhandler.objectAdded(ret.getPhantomExternalId(), type, false); return ret.getWeakExternalId(); }
/** * Create a root object. A root object will not be automatically * garbage collected when no references point to this object * any longer. * Creates an object identifier that can be used * to store/retrieve attribute values. * May reuse old object identifiers for performance. * @return An object identifier. */ public Object createRootObject(OAVObjectType type) { Object ret = createObject(type); this.rootobjects.add(ret); eventhandler.objectAdded(((OAVExternalObjectId)ret).getInternalId().getPhantomExternalId(), type, true); assert ret instanceof OAVExternalObjectId; return ret; }
/** * Create a root object. A root object will not be automatically * garbage collected when no references point to this object * any longer. * Creates an object identifier that can be used * to store/retrieve attribute values. * May reuse old object identifiers for performance. * @return An object identifier. */ public Object createRootObject(OAVObjectType type) { Object ret = createObject(type); this.rootobjects.add(ret); eventhandler.objectAdded(((OAVExternalObjectId)ret).getInternalId().getPhantomExternalId(), type, true); assert ret instanceof OAVExternalObjectId; return ret; }