// persist pending contexts
Map<ContextId, ControllerContext> pendingContexts = contextProvider.getPendingContexts();
List<PropertyKey> keys = Lists.newArrayList();
List<ControllerContextHolder> properties = Lists.newArrayList();
for (ContextId contextId : pendingContexts.keySet()) {
ControllerContextHolder holder = new ControllerContextHolder(pendingContexts.get(contextId));
if (holder != null) {
keys.add(keyBuilder.controllerContext(contextId.stringify()));
properties.add(holder);
}
}