public synchronized <KIn, VIn> StreamsBuilder addGlobalStore(final StoreBuilder<?> storeBuilder,
                                                                 final String topic,
                                                                 final Consumed<KIn, VIn> consumed,
                                                                 final ProcessorSupplier<KIn, VIn, Void, Void> stateUpdateSupplier) {
        Objects.requireNonNull(storeBuilder, "storeBuilder can't be null");
        Objects.requireNonNull(consumed, "consumed can't be null");
        internalStreamsBuilder.addGlobalStore(
            new StoreBuilderWrapper(storeBuilder),
            topic,
            new ConsumedInternal<>(consumed),
            stateUpdateSupplier,
            true
        );
        return this;
    }
Adds a global {@link StateStore} to the topology.
The {@link StateStore} sources its data from all partitions of the provided input topic.
There will be exactly one instance of this {@link StateStore} per Kafka Streams instance.
<p>
A {@link SourceNode} with the provided sourceName will be added to consume the data arriving from the partitions
of the input topic.
<p>
The provided {@link ProcessorSupplier} will be used to create an
{@link Processor} that will receive all records forwarded from the {@link SourceNode}.
The supplier should always generate a new instance. Creating a single {@link Processor} object
and returning the same object reference in {@link ProcessorSupplier#get()} is a
violation of the supplier pattern and leads to runtime exceptions.
This {@link Processor} should be used to keep the {@link StateStore} up-to-date.
The default {@link TimestampExtractor} as specified in the {@link StreamsConfig config} is used.
<p>
It is not required to connect a global store to the {@link Processor Processors},
{@link Transformer Transformers}, or {@link ValueTransformer ValueTransformer}; those have read-only access to all global stores by default.

@param storeBuilder          user defined {@link StoreBuilder}; can't be {@code null}
@param topic                 the topic to source the data from
@param consumed              the instance of {@link Consumed} used to define optional parameters; can't be {@code null}
@param stateUpdateSupplier   the instance of {@link ProcessorSupplier}
@return itself
@throws TopologyException if the processor of state is already registered
streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java