HGSortedSet<E> write() { List<LogEntry> log = txManager.getContext().getCurrent().getTopLevel().getAttribute(S); if (log == null) // should we copy-on-write? { HGSortedSet<E> readOnly = S.get(); // S.getForWrite(); HGSortedSet<E> writeable = cloneSet(readOnly); S.put(writeable); } return S.get(); }
HGSortedSet<E> read() { return S.get(); }