المحلول
شكرا على السؤال! أنا على فريق NEO4J، ولدينا حاليا أدوات تجارية تبلغ عن هذا النوع من المعلومات. ومع ذلك، يتم جدولة امتداد API لإصدار المصدر المفتوح التالي. في الوقت الحالي، يمكنك استخدام API غير الرسمي التالية:
EmbeddedNeo.getConfig().getNeoModule().getNodeManager().getNumberOfIdsInUse(Class)
حيث سيكون الفصل Node.class
, Relationship.class
أو PropertyStore.class
.
نصائح أخرى
هذا عملت بالنسبة لي:
import org.neo4j.kernel.impl.nioneo.store.PropertyStore
graph.getConfig().getGraphDbModule().getNodeManager().getNumberOfIdsInUse(Node.class);
graph.getConfig().getGraphDbModule().getNodeManager().getNumberOfIdsInUse(Relationship.class);
graph.getConfig().getGraphDbModule().getNodeManager().getNumberOfIdsInUse(PropertyStore.class)
لا تنتمي إلى StackOverflow