Inline method
Change-Id: I51d8b9b22d0c61625144dcdb7d75d3565e60e197
Showing
1 changed file
with
1 additions
and
13 deletions
... | @@ -124,7 +124,7 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour | ... | @@ -124,7 +124,7 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour |
124 | TransactionalContinuousResourceStore continuousTxStore = continuousStore.transactional(tx); | 124 | TransactionalContinuousResourceStore continuousTxStore = continuousStore.transactional(tx); |
125 | for (Map.Entry<DiscreteResource, List<Resource>> entry : resourceMap.entrySet()) { | 125 | for (Map.Entry<DiscreteResource, List<Resource>> entry : resourceMap.entrySet()) { |
126 | DiscreteResourceId parentId = entry.getKey().id(); | 126 | DiscreteResourceId parentId = entry.getKey().id(); |
127 | - if (!lookup(discreteTxStore, parentId).isPresent()) { | 127 | + if (!discreteTxStore.lookup(parentId).isPresent()) { |
128 | return abortTransaction(tx); | 128 | return abortTransaction(tx); |
129 | } | 129 | } |
130 | 130 | ||
... | @@ -407,18 +407,6 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour | ... | @@ -407,18 +407,6 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour |
407 | && continuousTxStore.removeValues(key, continuousValues); | 407 | && continuousTxStore.removeValues(key, continuousValues); |
408 | } | 408 | } |
409 | 409 | ||
410 | - /** | ||
411 | - * Returns the resource which has the same key as the specified resource ID | ||
412 | - * in the set as a value of the map. | ||
413 | - * | ||
414 | - * @param id ID of resource to be checked | ||
415 | - * @return the resource which is regarded as the same as the specified resource | ||
416 | - */ | ||
417 | - private Optional<Resource> lookup(TransactionalDiscreteResourceStore discreteTxStore, | ||
418 | - DiscreteResourceId id) { | ||
419 | - return discreteTxStore.lookup(id); | ||
420 | - } | ||
421 | - | ||
422 | // internal use only | 410 | // internal use only |
423 | static final class ContinuousResourceAllocation { | 411 | static final class ContinuousResourceAllocation { |
424 | private final ContinuousResource original; | 412 | private final ContinuousResource original; | ... | ... |
-
Please register or login to post a comment