Iterator enumtr = getAllChangeSets().values().iterator();
while (enumtr.hasNext()) {
ObjectChangeSet changeSet = (ObjectChangeSet)enumtr.next();
// navigate through the related change sets here and set their cache synchronization type as well
ClassDescriptor descriptor = session.getDescriptor(changeSet.getClassType(session));
int syncType = descriptor.getCacheSynchronizationType();
// Change sets for new objects will only be sent as part of the UnitOfWorkChangeSet
// if they are meant to be merged into the distributed cache.
// Note: New objects could still be sent if the are referred to by a change record.
if (!changeSet.isNew() || (syncType == ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)) {
changeSet.setSynchronizationType(syncType);
changeSet.prepareChangeRecordsForSynchronization(session);
writableChangeSets.put(changeSet, changeSet);
}
}
Map sendableDeletedObjects = new IdentityHashMap();
enumtr = getDeletedObjects().keySet().iterator();
while (enumtr.hasNext()) {
ObjectChangeSet changeSet = (ObjectChangeSet)enumtr.next();
// navigate through the related change sets here and set their cache synchronization type as well
ClassDescriptor descriptor = session.getDescriptor(changeSet.getClassType(session));
int syncType = descriptor.getCacheSynchronizationType();
// Change sets for new objects will only be sent as part of the UnitOfWorkChangeSet
// if they are meant to be merged into the distributed cache.
// Note: New objects could still be sent if the are referred to by a change record.
if (syncType != ClassDescriptor.DO_NOT_SEND_CHANGES) {