@Override public void shutdown() { flush(); if (getSearchIndex() != null) { this.searchIndex.shutdown(); this.searchIndex = null; } }
protected void setupGraphMetadata() { foundIdGeneratorClassnameInMetadata = false; for (GraphMetadataEntry graphMetadataEntry : getMetadata()) { setupGraphMetadata(graphMetadataEntry); } if (!foundIdGeneratorClassnameInMetadata) { setMetadata(METADATA_ID_GENERATOR_CLASSNAME, this.idGenerator.getClass().getName()); } }
@Override public AccumuloGraphConfiguration getConfiguration() { return (AccumuloGraphConfiguration) super.getConfiguration(); }
@Override public void reindex(Authorizations authorizations) { reindexVertices(authorizations); reindexEdges(authorizations); }
private boolean isDefaultSearchIndex() { if (!(graph instanceof GraphBaseWithSearchIndex)) { return false; } GraphBaseWithSearchIndex graphBaseWithSearchIndex = (GraphBaseWithSearchIndex) graph; return graphBaseWithSearchIndex.getSearchIndex() instanceof DefaultSearchIndex; }
@Override public PropertyDefinition define() { PropertyDefinition propertyDefinition = super.define(); try { getSearchIndex().addPropertyDefinition(propertyDefinition); } catch (IOException e) { throw new SecureGraphException("Could not add property definition to search index", e); } setMetadata(METADATA_DEFINE_PROPERTY_PREFIX + propertyName, propertyDefinition); return propertyDefinition; } };
protected void setup() { setupGraphMetadata(); }
private void flushWritersAndSuper() { flushWriter(this.dataWriter); flushWriter(this.verticesWriter); flushWriter(this.edgesWriter); super.flush(); }
protected void reindexVertices(Authorizations authorizations) { this.searchIndex.addElements(this, new ToElementIterable<Vertex>(getVertices(authorizations)), authorizations); }
private void reindexEdges(Authorizations authorizations) { this.searchIndex.addElements(this, new ToElementIterable<Edge>(getEdges(authorizations)), authorizations); }
private boolean isDefaultSearchIndex() { if (!(graph instanceof GraphBaseWithSearchIndex)) { return false; } GraphBaseWithSearchIndex graphBaseWithSearchIndex = (GraphBaseWithSearchIndex) graph; return graphBaseWithSearchIndex.getSearchIndex() instanceof DefaultSearchIndex; }
@Override public PropertyDefinition define() { PropertyDefinition propertyDefinition = super.define(); try { getSearchIndex().addPropertyDefinition(propertyDefinition); } catch (IOException e) { throw new SecureGraphException("Could not add property definition to search index", e); } setMetadata(METADATA_DEFINE_PROPERTY_PREFIX + propertyName, propertyDefinition); return propertyDefinition; } };
protected void setup() { setupGraphMetadata(); }
@Override public void reindex(Authorizations authorizations) { reindexVertices(authorizations); reindexEdges(authorizations); }
protected void reindexVertices(Authorizations authorizations) { this.searchIndex.addElements(this, new ToElementIterable<Vertex>(getVertices(authorizations)), authorizations); }
private void reindexEdges(Authorizations authorizations) { this.searchIndex.addElements(this, new ToElementIterable<Edge>(getEdges(authorizations)), authorizations); }
@Override public SearchIndexSecurityGranularity getSearchIndexSecurityGranularity() { return getSearchIndex().getSearchIndexSecurityGranularity(); } }
protected void setupGraphMetadata() { foundIdGeneratorClassnameInMetadata = false; for (GraphMetadataEntry graphMetadataEntry : getMetadata()) { setupGraphMetadata(graphMetadataEntry); } if (!foundIdGeneratorClassnameInMetadata) { setMetadata(METADATA_ID_GENERATOR_CLASSNAME, this.idGenerator.getClass().getName()); } }
@Override public void shutdown() { flush(); if (getSearchIndex() != null) { this.searchIndex.shutdown(); this.searchIndex = null; } }
@Override protected void setupGraphMetadata() { foundValueSerializerMetadata = false; super.setupGraphMetadata(); if (!foundValueSerializerMetadata) { setMetadata(METADATA_VALUE_SERIALIZER, valueSerializer.getClass().getName()); } }