You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolves#2777
If the filter supports it, defer filtering until the last possible moment.
Then, the worst case scenario after a catastrophic failure (e.g. power loss),
would be that at most one file will be incorrectly filtered on restart.
Polishing and add more tests.
Polishing Javadocs
More Polishing
Final polishing
More polishing.
Polishing and docPolishing and docs.
* Fix typos in Docs
Copy file name to clipboardExpand all lines: spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractFileListFilter.java
+8-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2002-2017 the original author or authors.
2
+
* Copyright 2002-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
Copy file name to clipboardExpand all lines: spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractMarkerFilePresentFileListFilter.java
+4-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2017 the original author or authors.
2
+
* Copyright 2017-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -31,6 +31,9 @@
31
31
* A FileListFilter that only passes files matched by one or more {@link FileListFilter}
32
32
* if a corresponding marker file is also present to indicate a file transfer is complete.
33
33
*
34
+
* Since they look at multiple files, they cannot be used for late filtering in the
Copy file name to clipboardExpand all lines: spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractPersistentAcceptOnceFileListFilter.java
Copy file name to clipboardExpand all lines: spring-integration-file/src/main/java/org/springframework/integration/file/filters/ChainFileListFilter.java
+12-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2017 the original author or authors.
2
+
* Copyright 2017-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -62,4 +62,15 @@ public List<F> filterFiles(F[] files) {
62
62
returnleftOver;
63
63
}
64
64
65
+
@Override
66
+
publicbooleanaccept(Ffile) {
67
+
// we can't use stream().allMatch() because there is no guarantee of early exit
68
+
for (FileListFilter<F> filter : this.fileFilters) {
Copy file name to clipboardExpand all lines: spring-integration-file/src/main/java/org/springframework/integration/file/filters/CompositeFileListFilter.java
Copy file name to clipboardExpand all lines: spring-integration-file/src/main/java/org/springframework/integration/file/filters/DiscardAwareFileListFilter.java
+2-1
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,10 @@
22
22
23
23
/**
24
24
* The {@link FileListFilter} modification which can accept a {@link Consumer}
25
-
* which can be called when filter discards the file.
25
+
* which can be called when the filter discards the file.
Copy file name to clipboardExpand all lines: spring-integration-file/src/main/java/org/springframework/integration/file/filters/LastModifiedFileListFilter.java
0 commit comments