Search in sources :

Example 1 with SerializerAttributesHolder

use of org.apache.geode.internal.InternalDataSerializer.SerializerAttributesHolder in project geode by apache.

the class PoolManagerImpl method allPoolsRegisterDataSerializers.

public static void allPoolsRegisterDataSerializers(SerializerAttributesHolder holder) {
    SerializerAttributesHolder[] holders = new SerializerAttributesHolder[1];
    holders[0] = holder;
    for (Iterator<Pool> itr = PoolManager.getAll().values().iterator(); itr.hasNext(); ) {
        PoolImpl next = (PoolImpl) itr.next();
        try {
            EventID eventId = (EventID) holder.getEventId();
            if (eventId == null) {
                eventId = InternalDataSerializer.generateEventId();
            }
            if (eventId == null) {
            // cache must not exist, do nothing
            } else {
                RegisterDataSerializersOp.execute(next, holders, eventId);
            }
        } catch (RuntimeException e) {
            logger.warn(LocalizedMessage.create(LocalizedStrings.PoolmanagerImpl_ERROR_REGISTERING_INSTANTIATOR_ON_POOL), e);
        } finally {
            next.releaseThreadLocalConnection();
        }
    }
}
Also used : SerializerAttributesHolder(org.apache.geode.internal.InternalDataSerializer.SerializerAttributesHolder) Pool(org.apache.geode.cache.client.Pool) PoolImpl(org.apache.geode.cache.client.internal.PoolImpl)

Aggregations

Pool (org.apache.geode.cache.client.Pool)1 PoolImpl (org.apache.geode.cache.client.internal.PoolImpl)1 SerializerAttributesHolder (org.apache.geode.internal.InternalDataSerializer.SerializerAttributesHolder)1