in src/main/java/com/googlesource/gerrit/plugins/pubsub/PubSubConfiguration.java [56:81]
public PubSubConfiguration(
PluginConfigFactory configFactory,
@PluginName String pluginName,
@Nullable @GerritInstanceId String instanceId) {
this.fromGerritConfig = configFactory.getFromGerritConfig(pluginName);
this.gcloudProject = getMandatoryString(GCLOUD_PROJECT_FIELD);
this.subscriptionId = getMandatoryString(SUBSCRIPTION_ID_FIELD, instanceId);
this.privateKeyLocation = getMandatoryString(PRIVATE_KEY_LOCATION_FIELD);
this.streamEventsTopic =
fromGerritConfig.getString(STREAM_EVENTS_TOPIC_FIELD, DEFAULT_STREAM_EVENTS_TOPIC);
this.sendStreamEvents =
fromGerritConfig.getBoolean(SEND_STREAM_EVENTS_FIELD, DEFAULT_SEND_STREAM_EVENTS);
this.numberOfSubscribers =
Integer.parseInt(
fromGerritConfig.getString(NUMBER_OF_SUBSCRIBERS_FIELD, DEFAULT_NUMBER_OF_SUBSCRIBERS));
this.ackDeadlineSeconds =
Integer.parseInt(
fromGerritConfig.getString(ACK_DEADLINE_SECONDS_FIELD, DEFAULT_ACK_DEADLINE_SECONDS));
this.subscribtionTimeoutInSeconds =
Long.parseLong(
fromGerritConfig.getString(
SUBSCRIPTION_TIMEOUT_SECONDS_FIELD, DEFAULT_SUBSCTIPRION_TIMEOUT));
this.shutdownTimeoutInSeconds =
Long.parseLong(
fromGerritConfig.getString(SHUTDOWN_TIMEOUT_SECONDS_FIELD, DEFAULT_SHUTDOWN_TIMEOUT));
}