public Builder properties(final StoreProperties properties) { if (null == properties) { this.properties = null; } else { this.properties = properties.getProperties(); } return _self(); }
@JsonGetter("storeProperties") public Properties getProperties() { return null != storeProperties ? storeProperties.getProperties() : null; }
@JsonGetter("storeProperties") public Properties getProperties() { return null != storeProperties ? storeProperties.getProperties() : null; }
@JsonIgnore public Builder graph(final Graph graph) { schema = graph.getSchema(); properties = graph.getStoreProperties().getProperties(); config = graph.getConfig(); return _self(); }
private void validateSameAsFromCache(final Graph newGraph, final String graphId) { final Graph fromCache = federatedStoreCache.getGraphSerialisableFromCache(graphId).getGraph(graphLibrary); if (!newGraph.getStoreProperties().getProperties().equals(fromCache.getStoreProperties().getProperties())) { throw new RuntimeException(String.format(ERROR_ADDING_GRAPH_TO_CACHE, GraphConfigEnum.PROPERTIES.toString(), graphId)); } else { if (!JsonUtil.equals(newGraph.getSchema().toJson(false), fromCache.getSchema().toJson(false))) { throw new RuntimeException(String.format(ERROR_ADDING_GRAPH_TO_CACHE, GraphConfigEnum.SCHEMA.toString(), graphId)); } else { if (!newGraph.getGraphId().equals(fromCache.getGraphId())) { throw new RuntimeException(String.format(ERROR_ADDING_GRAPH_TO_CACHE, "GraphId", graphId)); } } } }
public <OP extends Validatable & Operation> GafferAdder(final OP operation, final Store store) { this.store = store; this.validate = operation.isValidate(); this.skipInvalid = operation.isSkipInvalidElements(); final String maxQueueSizeOption = operation.getOption(FlinkConstants.MAX_QUEUE_SIZE); this.maxQueueSize = null != maxQueueSizeOption ? Integer.parseInt(maxQueueSizeOption) : MAX_QUEUE_SIZE_DEFAULT; graphId = store.getGraphId(); schema = store.getSchema().toCompactJson(); properties = store.getProperties().getProperties(); }