Collection<Deployment> () { synchronized (myLock) { if (myCachedAllDeployments == null) { Collection<Deployment> result = doListDeployments(); myCachedAllDeployments = List.copyOf(result); } return myCachedAllDeployments; } }