| | |
| | | |
| | | /** Schema used to build the compressed information. */ |
| | | @GuardedBy("lock") |
| | | private Schema schemaNG; |
| | | private Schema schema; |
| | | @GuardedBy("lock") |
| | | private Mappings mappings = new Mappings(); |
| | | |
| | |
| | | boolean shared = true; |
| | | try |
| | | { |
| | | Schema currentSchema = serverContext.getSchemaNG(); |
| | | if (schemaNG != currentSchema) |
| | | Schema currentSchema = serverContext.getSchema(); |
| | | if (schema != currentSchema) |
| | | { |
| | | sharedLock.unlock(); |
| | | exclusiveLock.lock(); |
| | | shared = false; |
| | | |
| | | currentSchema = serverContext.getSchemaNG(); |
| | | if (schemaNG != currentSchema) |
| | | currentSchema = serverContext.getSchema(); |
| | | if (schema != currentSchema) |
| | | { |
| | | // build new maps from existing ones |
| | | Mappings newMappings = new Mappings(mappings.adEncodeMap.size(), mappings.ocEncodeMap.size()); |
| | |
| | | reloadObjectClassesMap(mappings, newMappings); |
| | | |
| | | mappings = newMappings; |
| | | schemaNG = currentSchema; |
| | | schema = currentSchema; |
| | | } |
| | | } |
| | | return mappings; |