Locking the Type Definition Cache
Multi-threaded applications can run into problems if one thread is accessing event type definition information and another thread calls the BrokerTypeCache.flushCache method. In these situations, threads that need to access the type definition cache should lock the cache before using any of the following methods:
BrokerClient.getEventTypeDef BrokerClient.getEventTypeNames BrokerTypeDef.getBrokerHost BrokerTypeDef.getBrokerName BrokerTypeDef.getBrokerPort BrokerTypeDef.getTypeName BrokerTypeDef.getFieldNames BrokerTypeDef.getFieldType Use the BrokerTypeCache.lockCache method to lock the local type definition cache and prevent it from being altered or flushed.
After a thread has finished accessing event type definition information, it should unlock the cache using the BrokerTypeCache.unlockCache method.