* If finer control is needed, you should consider accessing an implementation's
* constructors/builders.
*/
- public static class Factory {
+ public static final class Factory {
+ private Factory(){
+ //not called
+ }
public static ChampGraph newInstance(ChampGraph.Type type, String graphName) {
switch (type) {
case IN_MEMORY:
.build();
/*
case DSE: //See above, DSE still in beta
- return new DseChampGraphImpl.Builder("localhost").build();
*/
default:
throw new RuntimeException("Unknown type of ChampAPI implementation");
public abstract Stream<ChampObject> queryObjects(Map<String, Object> queryParams);
public abstract ChampRelationship executeStoreRelationship(ChampRelationship relationship) throws ChampUnmarshallingException, ChampMarshallingException, ChampObjectNotExistsException, ChampSchemaViolationException, ChampRelationshipNotExistsException;
public abstract ChampRelationship executeReplaceRelationship(ChampRelationship relationship) throws ChampUnmarshallingException, ChampMarshallingException, ChampSchemaViolationException, ChampRelationshipNotExistsException;
+ @Override
public abstract Optional<ChampRelationship> retrieveRelationship(Object key) throws ChampUnmarshallingException;
public abstract void executeDeleteRelationship(ChampRelationship relationship) throws ChampRelationshipNotExistsException;
+ @Override
public abstract Stream<ChampRelationship> retrieveRelationships(ChampObject object) throws ChampUnmarshallingException, ChampObjectNotExistsException;
+ @Override
public abstract Stream<ChampRelationship> queryRelationships(Map<String, Object> queryParams);
public abstract ChampPartition executeStorePartition(ChampPartition partition) throws ChampSchemaViolationException, ChampRelationshipNotExistsException, ChampMarshallingException, ChampObjectNotExistsException;
public abstract void executeDeletePartition(ChampPartition graph);
public abstract void executeStoreObjectIndex(ChampObjectIndex index);
+ @Override
public abstract Optional<ChampObjectIndex> retrieveObjectIndex(String indexName);
+ @Override
public abstract Stream<ChampObjectIndex> retrieveObjectIndices();
public abstract void executeDeleteObjectIndex(String indexName) throws ChampIndexNotExistsException;
public abstract void executeStoreRelationshipIndex(ChampRelationshipIndex index);
/** Configuration property for setting the comma-separated list of servers to use for
* communicating with the event bus. */
- public final static String PARAM_EVENT_STREAM_HOSTS = "champ.event.stream.hosts";
+ public static final String PARAM_EVENT_STREAM_HOSTS = "champ.event.stream.hosts";
/** Configuration property for setting the number of events that we will try to 'batch'
* up before sending them to the event bus. */