private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); // Serialize local snapshots cache if (!isUsingSharedSnapshotCache()) { out.writeObject(objectStore.getDataRowCache()); } }
/** * Creates a new DataContext with parent DataChannel and ObjectStore. * * @since 1.2 */ public DataContext(DataChannel channel, ObjectStore objectStore) { // inject self as parent context if (objectStore != null) { this.objectStore = objectStore; objectStore.setContext(this); } if (channel != null) { attachToChannel(channel); } if (objectStore != null) { DataDomain domain = getParentDataDomain(); this.usingSharedSnaphsotCache = domain != null && objectStore.getDataRowCache() == domain.getSharedSnapshotCache(); } }