Skip to content

Commit cff9983

Browse files
lukasGemelameltsufin
authored andcommitted
GcsStreamingMessageSource with comparator (spring-attic#2116)
Enables passing a compactor to process files in a defined order. Fixes: spring-attic#2117.
1 parent c91ee6c commit cff9983

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

spring-cloud-gcp-storage/src/main/java/org/springframework/cloud/gcp/storage/integration/inbound/GcsStreamingMessageSource.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2018 the original author or authors.
2+
* Copyright 2017-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
1717
package org.springframework.cloud.gcp.storage.integration.inbound;
1818

1919
import java.util.Collection;
20+
import java.util.Comparator;
2021
import java.util.List;
2122
import java.util.stream.Collectors;
2223

@@ -35,11 +36,16 @@
3536
* @author João André Martins
3637
* @author Mike Eltsufin
3738
* @author Chengyuan Zhao
39+
* @author Lukas Gemela
3840
*/
3941
public class GcsStreamingMessageSource extends AbstractRemoteFileStreamingMessageSource<BlobInfo> {
4042

4143
public GcsStreamingMessageSource(RemoteFileTemplate<BlobInfo> template) {
42-
super(template, null);
44+
this(template, null);
45+
}
46+
47+
public GcsStreamingMessageSource(RemoteFileTemplate<BlobInfo> template, Comparator<BlobInfo> comparator) {
48+
super(template, comparator);
4349
doSetFilter(new GcsPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "gcsStreamingMessageSource"));
4450
}
4551

0 commit comments

Comments
 (0)