public void flush() {
LOGGER.debug("Flushing changes to database.");
for (Descriptor descriptor : descriptorCache.getDescriptors()) {
LOGGER.debug("Flushing descriptor '{}'.", descriptor.getFullQualifiedName());
Node node = getNode(descriptor);
DescriptorMapper mapper = registry.getDescriptorMapper(descriptor.getClass());
flushRelations(descriptor, node, mapper);
flushProperties(descriptor, node, mapper);
flushLabels(descriptor, node, mapper);
}
this.descriptorCache.flush();