use of org.apache.geode.internal.InternalInstantiator.InstantiatorAttributesHolder in project geode by apache.
the class DiskInitFile method saveInstantiators.
private void saveInstantiators() {
Object[] objects = InternalInstantiator.getInstantiatorsForSerialization();
for (Object obj : objects) {
if (obj instanceof Instantiator) {
saveInstantiator((Instantiator) obj);
} else {
InstantiatorAttributesHolder iah = (InstantiatorAttributesHolder) obj;
saveInstantiator(iah.getId(), iah.getInstantiatorClassName(), iah.getInstantiatedClassName());
}
}
}
use of org.apache.geode.internal.InternalInstantiator.InstantiatorAttributesHolder in project geode by apache.
the class PoolManagerImpl method allPoolsRegisterInstantiator.
public static void allPoolsRegisterInstantiator(InstantiatorAttributesHolder holder) {
InstantiatorAttributesHolder[] holders = new InstantiatorAttributesHolder[1];
holders[0] = holder;
for (Iterator<Pool> itr = PoolManager.getAll().values().iterator(); itr.hasNext(); ) {
PoolImpl next = (PoolImpl) itr.next();
try {
EventID eventId = InternalInstantiator.generateEventId();
if (eventId == null) {
// cache must not exist, do nothing
} else {
RegisterInstantiatorsOp.execute(next, holders, InternalInstantiator.generateEventId());
}
} catch (RuntimeException e) {
logger.warn(LocalizedMessage.create(LocalizedStrings.PoolmanagerImpl_ERROR_REGISTERING_INSTANTIATOR_ON_POOL), e);
} finally {
next.releaseThreadLocalConnection();
}
}
}
Aggregations