28
28
*/
29
29
public class Pager <ApiType extends KubernetesObject , ApiListType extends KubernetesListObject >
30
30
implements Iterable <ApiType > {
31
- private Integer limit ;
32
- private ApiClient client ;
33
- private Type listType ;
34
- private Function <PagerParams , Call > listFunc ;
35
-
36
- private ApiListType listObjectCurrentPage ;
31
+ private final Integer limit ;
32
+ private final ApiClient client ;
33
+ private final Type listType ;
34
+ private final Function <PagerParams , Call > listFunc ;
37
35
38
36
/**
39
37
* Pagination in kubernetes list call depends on continue and limit variable
@@ -108,9 +106,9 @@ private class PagerIterator implements Iterator<ApiType> {
108
106
109
107
private boolean started ;
110
108
private String continueToken ;
111
- private Call call ;
112
109
private int offsetCurrentPage ;
113
110
private int currentPageSize ;
111
+ private ApiListType listObjectCurrentPage ;
114
112
115
113
/**
116
114
* returns false if kubernetes server has exhausted List.
@@ -132,7 +130,7 @@ public boolean hasNext() {
132
130
133
131
protected void makeCall () {
134
132
try {
135
- call = getNextCall (limit , continueToken );
133
+ Call call = getNextCall (limit , continueToken );
136
134
137
135
listObjectCurrentPage = executeRequest (call );
138
136
continueToken = listObjectCurrentPage .getMetadata ().getContinue ();
0 commit comments