del.checkForTreeModification(); } else { tree = new DelegatingStorage((Storage<T>) tree);
/** Exists tree ownership. */ private AbstractLookup.Storage exitStorage() { synchronized (treeLock) { AbstractLookup.Storage stor = ((DelegatingStorage) tree).exitDelegate(); tree = stor; treeLock.notifyAll(); return stor; } }
/** Checks whether we have simple behaviour of complex. */ private boolean isSimple() { Storage s = (Storage) reference.lookup.tree; return DelegatingStorage.isSimple(s); }
public Transaction beginTransaction(int ensure) { try { return delegate.beginTransaction(ensure); } catch (UnsupportedOperationException ex) { // let's convert to InheritanceTree ArrayStorage arr = (ArrayStorage) delegate; InheritanceTree inh = new InheritanceTree(); changeDelegate(inh); // // Copy content // Enumeration<Pair<Object>> en = arr.lookup(Object.class); while (en.hasMoreElements()) { if (!inh.add(en.nextElement(), new ArrayList<Class>())) { throw new IllegalStateException("All objects have to be accepted"); // NOI18N } } // // Copy listeners // AbstractLookup.ReferenceToResult<?> ref = arr.cleanUpResult(null); if (ref != null) { ref.cloneList(inh); } // we have added the current content and now we can start transaction return delegate.beginTransaction(ensure); } }
public Transaction beginTransaction(int ensure) { try { return delegate.beginTransaction(ensure); } catch (UnsupportedOperationException ex) { // let's convert to InheritanceTree ArrayStorage arr = (ArrayStorage) delegate; InheritanceTree inh = new InheritanceTree(); changeDelegate(inh); // // Copy content // Enumeration<Pair<Object>> en = arr.lookup(Object.class); while (en.hasMoreElements()) { if (!inh.add(en.nextElement(), new ArrayList<Class>())) { throw new IllegalStateException("All objects have to be accepted"); // NOI18N } } // // Copy listeners // AbstractLookup.ReferenceToResult<?> ref = arr.cleanUpResult(null); if (ref != null) { ref.cloneList(inh); } // we have added the current content and now we can start transaction return delegate.beginTransaction(ensure); } }
del.checkForTreeModification (); try { treeLock.wait (); } else { tree = new DelegatingStorage ((Storage)tree); return (Storage)tree;
/** Storage check for tests. */ static boolean isSimple(AbstractLookup l) { return DelegatingStorage.isSimple((Storage)l.tree); }
/** Exists tree ownership. */ private AbstractLookup.Storage exitStorage() { synchronized (treeLock) { AbstractLookup.Storage stor = ((DelegatingStorage) tree).exitDelegate(); tree = stor; treeLock.notifyAll(); return stor; } }
public Transaction beginTransaction(int ensure) { try { return delegate.beginTransaction(ensure); } catch (UnsupportedOperationException ex) { // let's convert to InheritanceTree ArrayStorage arr = (ArrayStorage) delegate; InheritanceTree inh = new InheritanceTree(); changeDelegate(inh); // // Copy content // Enumeration<Pair<Object>> en = arr.lookup(Object.class); while (en.hasMoreElements()) { if (!inh.add(en.nextElement(), new ArrayList<Class>())) { throw new IllegalStateException("All objects have to be accepted"); // NOI18N } } // // Copy listeners // AbstractLookup.ReferenceToResult<?> ref = arr.cleanUpResult(null); if (ref != null) { ref.cloneList(inh); } // we have added the current content and now we can start transaction return delegate.beginTransaction(ensure); } }
del.checkForTreeModification (); try { treeLock.wait (); } else { tree = new DelegatingStorage ((Storage)tree); return (Storage)tree;
/** Checks whether we have simple behaviour of complex. */ private boolean isSimple () { Storage s = (Storage)reference.lookup.tree; return DelegatingStorage.isSimple (s); }
/** Exists tree ownership. */ private AbstractLookup.Storage exitStorage() { synchronized (treeLock) { AbstractLookup.Storage stor = ((DelegatingStorage) tree).exitDelegate(); tree = stor; treeLock.notifyAll(); return stor; } }
del.checkForTreeModification(); } else { tree = new DelegatingStorage((Storage<T>) tree);
/** Checks whether we have simple behaviour of complex. */ private boolean isSimple() { Storage s = (Storage) reference.lookup.tree; return DelegatingStorage.isSimple(s); }
/** Exists tree ownership. */ private AbstractLookup.Storage exitStorage () { synchronized (treeLock) { AbstractLookup.Storage stor = ((DelegatingStorage)tree).exitDelegate (); tree = stor; treeLock.notifyAll (); return stor; } }
del.checkForTreeModification(); } else { tree = new DelegatingStorage((Storage<T>) tree);
/** Checks whether we have simple behaviour of complex. */ private boolean isSimple () { Storage s = (Storage)reference.lookup.tree; return DelegatingStorage.isSimple (s); }
/** Exists tree ownership. */ private AbstractLookup.Storage exitStorage () { synchronized (treeLock) { AbstractLookup.Storage stor = ((DelegatingStorage)tree).exitDelegate (); tree = stor; treeLock.notifyAll (); return stor; } }
/** Checks whether we have simple behaviour of complex. */ private boolean isSimple() { Storage s = (Storage) reference.lookup.tree; return DelegatingStorage.isSimple(s); }
/** Storage check for tests. */ static boolean isSimple(AbstractLookup l) { return DelegatingStorage.isSimple((Storage)l.tree); }