Jonathan Hart
Committed by Gerrit Code Review

Roll back resource API changes that triggered a bug in the Java compiler

Change-Id: I9e6891fe156148692e59476cb2bec6defb1f9a70
...@@ -43,7 +43,7 @@ public interface ResourceAdminService { ...@@ -43,7 +43,7 @@ public interface ResourceAdminService {
43 * @return true if registration is successfully done, false otherwise. Registration 43 * @return true if registration is successfully done, false otherwise. Registration
44 * succeeds when each resource is not registered or unallocated. 44 * succeeds when each resource is not registered or unallocated.
45 */ 45 */
46 - boolean register(List<? extends Resource> resources); 46 + boolean register(List<Resource> resources);
47 47
48 /** 48 /**
49 * Unregisters the specified resources. 49 * Unregisters the specified resources.
...@@ -63,5 +63,5 @@ public interface ResourceAdminService { ...@@ -63,5 +63,5 @@ public interface ResourceAdminService {
63 * @return true if unregistration is successfully done, false otherwise. Unregistration 63 * @return true if unregistration is successfully done, false otherwise. Unregistration
64 * succeeds when each resource is not registered or unallocated. 64 * succeeds when each resource is not registered or unallocated.
65 */ 65 */
66 - boolean unregister(List<? extends ResourceId> ids); 66 + boolean unregister(List<ResourceId> ids);
67 } 67 }
......
...@@ -66,7 +66,7 @@ public interface ResourceService extends ListenerService<ResourceEvent, Resource ...@@ -66,7 +66,7 @@ public interface ResourceService extends ListenerService<ResourceEvent, Resource
66 * @param resources resources to be allocated 66 * @param resources resources to be allocated
67 * @return non-empty list of allocation information if succeeded, otherwise empty list 67 * @return non-empty list of allocation information if succeeded, otherwise empty list
68 */ 68 */
69 - List<ResourceAllocation> allocate(ResourceConsumer consumer, List<? extends Resource> resources); 69 + List<ResourceAllocation> allocate(ResourceConsumer consumer, List<Resource> resources);
70 70
71 /** 71 /**
72 * Transactionally allocates the specified resources to the specified user. 72 * Transactionally allocates the specified resources to the specified user.
......
...@@ -37,7 +37,7 @@ public interface ResourceStore extends Store<ResourceEvent, ResourceStoreDelegat ...@@ -37,7 +37,7 @@ public interface ResourceStore extends Store<ResourceEvent, ResourceStoreDelegat
37 * @param resources resources to be registered 37 * @param resources resources to be registered
38 * @return true if the registration succeeds, false otherwise 38 * @return true if the registration succeeds, false otherwise
39 */ 39 */
40 - boolean register(List<? extends Resource> resources); 40 + boolean register(List<Resource> resources);
41 41
42 /** 42 /**
43 * Unregisters the resources in transactional way. 43 * Unregisters the resources in transactional way.
...@@ -48,7 +48,7 @@ public interface ResourceStore extends Store<ResourceEvent, ResourceStoreDelegat ...@@ -48,7 +48,7 @@ public interface ResourceStore extends Store<ResourceEvent, ResourceStoreDelegat
48 * @param ids resources to be unregistered 48 * @param ids resources to be unregistered
49 * @return true if the registration succeeds, false otherwise 49 * @return true if the registration succeeds, false otherwise
50 */ 50 */
51 - boolean unregister(List<? extends ResourceId> ids); 51 + boolean unregister(List<ResourceId> ids);
52 52
53 /** 53 /**
54 * Allocates the specified resources to the specified consumer in transactional way. 54 * Allocates the specified resources to the specified consumer in transactional way.
...@@ -60,7 +60,7 @@ public interface ResourceStore extends Store<ResourceEvent, ResourceStoreDelegat ...@@ -60,7 +60,7 @@ public interface ResourceStore extends Store<ResourceEvent, ResourceStoreDelegat
60 * @param consumer resource consumer which the resources are allocated to 60 * @param consumer resource consumer which the resources are allocated to
61 * @return true if the allocation succeeds, false otherwise. 61 * @return true if the allocation succeeds, false otherwise.
62 */ 62 */
63 - boolean allocate(List<? extends Resource> resources, ResourceConsumer consumer); 63 + boolean allocate(List<Resource> resources, ResourceConsumer consumer);
64 64
65 /** 65 /**
66 * Releases the specified allocated resources in transactional way. 66 * Releases the specified allocated resources in transactional way.
......
...@@ -80,7 +80,7 @@ public final class ResourceManager extends AbstractListenerManager<ResourceEvent ...@@ -80,7 +80,7 @@ public final class ResourceManager extends AbstractListenerManager<ResourceEvent
80 80
81 @Override 81 @Override
82 public List<ResourceAllocation> allocate(ResourceConsumer consumer, 82 public List<ResourceAllocation> allocate(ResourceConsumer consumer,
83 - List<? extends Resource> resources) { 83 + List<Resource> resources) {
84 checkNotNull(consumer); 84 checkNotNull(consumer);
85 checkNotNull(resources); 85 checkNotNull(resources);
86 86
...@@ -164,14 +164,14 @@ public final class ResourceManager extends AbstractListenerManager<ResourceEvent ...@@ -164,14 +164,14 @@ public final class ResourceManager extends AbstractListenerManager<ResourceEvent
164 } 164 }
165 165
166 @Override 166 @Override
167 - public boolean register(List<? extends Resource> resources) { 167 + public boolean register(List<Resource> resources) {
168 checkNotNull(resources); 168 checkNotNull(resources);
169 169
170 return store.register(resources); 170 return store.register(resources);
171 } 171 }
172 172
173 @Override 173 @Override
174 - public boolean unregister(List<? extends ResourceId> ids) { 174 + public boolean unregister(List<ResourceId> ids) {
175 checkNotNull(ids); 175 checkNotNull(ids);
176 176
177 return store.unregister(ids); 177 return store.unregister(ids);
......
...@@ -44,7 +44,7 @@ class MockResourceService implements ResourceService { ...@@ -44,7 +44,7 @@ class MockResourceService implements ResourceService {
44 private final Map<Resource, ResourceConsumer> assignment = new HashMap<>(); 44 private final Map<Resource, ResourceConsumer> assignment = new HashMap<>();
45 45
46 @Override 46 @Override
47 - public List<ResourceAllocation> allocate(ResourceConsumer consumer, List<? extends Resource> resources) { 47 + public List<ResourceAllocation> allocate(ResourceConsumer consumer, List<Resource> resources) {
48 assignment.putAll( 48 assignment.putAll(
49 resources.stream().collect(Collectors.toMap(x -> x, x -> consumer)) 49 resources.stream().collect(Collectors.toMap(x -> x, x -> consumer))
50 ); 50 );
......
...@@ -150,7 +150,7 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour ...@@ -150,7 +150,7 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour
150 } 150 }
151 151
152 @Override 152 @Override
153 - public boolean register(List<? extends Resource> resources) { 153 + public boolean register(List<Resource> resources) {
154 checkNotNull(resources); 154 checkNotNull(resources);
155 if (log.isTraceEnabled()) { 155 if (log.isTraceEnabled()) {
156 resources.forEach(r -> log.trace("registering {}", r)); 156 resources.forEach(r -> log.trace("registering {}", r));
...@@ -189,7 +189,7 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour ...@@ -189,7 +189,7 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour
189 } 189 }
190 190
191 @Override 191 @Override
192 - public boolean unregister(List<? extends ResourceId> ids) { 192 + public boolean unregister(List<ResourceId> ids) {
193 checkNotNull(ids); 193 checkNotNull(ids);
194 194
195 TransactionContext tx = service.transactionContextBuilder().build(); 195 TransactionContext tx = service.transactionContextBuilder().build();
...@@ -253,7 +253,7 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour ...@@ -253,7 +253,7 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour
253 } 253 }
254 254
255 @Override 255 @Override
256 - public boolean allocate(List<? extends Resource> resources, ResourceConsumer consumer) { 256 + public boolean allocate(List<Resource> resources, ResourceConsumer consumer) {
257 checkNotNull(resources); 257 checkNotNull(resources);
258 checkNotNull(consumer); 258 checkNotNull(consumer);
259 259
......