CapabilityRegistry createShadowCopy ( ) { CapabilityRegistry result = new CapabilityRegistry ( forServer , this ) ; readLock . lock ( ) ; try { try { result . writeLock . lock ( ) ; copy ( this , result ) ; } finally { result . writeLock . unlock ( ) ; } } finally { readLock . unlock ( ) ; } return result ; }
Creates updateable version of capability registry that on publish pushes all changes to main registry this is used to create context local registry that only on completion commits changes to main registry