>
> - @ConstructorProperties({ "kind", "nextPageToken", "items" })
> - protected ListPage(Kind kind, String nextPageToken, Iterable<T> items) {
> - this.kind = checkNotNull(kind, "kind");
> - this.nextPageToken = nextPageToken;
> - this.items = items != null ? ImmutableList.copyOf(items) :
> ImmutableList.<T>of();
> + public ListPage(PageWithMarker<T> delegate, Function<PageWithMarker<T>,
> PagedIterable<T>> advancingFunction) {
prefer to separate listpage so that it can be a simple data type. offering an
additional method or otherwise mean to construct an advancing list would be
more ideal than having all lists have additional internal state that includes
references to jclouds context internals. For example, a reference to this list
will keep a lot of a jclouds context from being gc'd, and the user may not
suspect that. I'm not saying we don't already do things like this. Just
suggesting that today, not sure we would always prefer to conflate the list
with its advancing function for all use cases. Simple way out is to make an
alternate method that returns a normal list.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/62/files#r19256126