@Override public List<ServiceHandle<?>> getAllServiceHandles( Filter searchCriteria) throws MultiException { checkState(); NarrowResults results; LinkedList<ErrorService> currentErrorHandlers = null; List<SystemDescriptor<?>> candidates = ReflectionHelper.cast(getDescriptors(searchCriteria)); ImmediateResults immediate = narrow(this, candidates, null, null, null, false, false, null, searchCriteria); results = immediate.getTimelessResults(); if (!results.getErrors().isEmpty()) { currentErrorHandlers = new LinkedList<ErrorService>(errorHandlers); } if (currentErrorHandlers != null) { // Do this next call OUTSIDE of the lock Utilities.handleErrors(results, currentErrorHandlers); } SortedSet<ServiceHandle<?>> retVal = new TreeSet<ServiceHandle<?>>(HANDLE_COMPARATOR); for (ActiveDescriptor<?> candidate : results.getResults()) { retVal.add(getServiceHandle(candidate)); } return new LinkedList<ServiceHandle<?>>(retVal); }
@Override public IgdValue compute(final IgdCacheKey key) { List<SystemDescriptor<?>> candidates = getDescriptors(key.filter, null, true, false, true); ImmediateResults immediate = narrow(ServiceLocatorImpl.this, candidates, key.contractOrImpl, null, null, false, true, null, key.filter, key.qualifiers); NarrowResults results = immediate.getTimelessResults(); if (!results.getErrors().isEmpty()) { Utilities.handleErrors(results, new LinkedList<ErrorService>(errorHandlers)); throw new ComputationErrorException(new IgdValue(results, immediate)) ; } return new IgdValue(results, immediate); } }, CACHE_SIZE, false);
@Override public List<ServiceHandle<?>> getAllServiceHandles( Filter searchCriteria) throws MultiException { checkState(); NarrowResults results; LinkedList<ErrorService> currentErrorHandlers = null; List<SystemDescriptor<?>> candidates = ReflectionHelper.cast(getDescriptors(searchCriteria)); ImmediateResults immediate = narrow(this, candidates, null, null, null, false, false, null, searchCriteria); results = immediate.getTimelessResults(); if (!results.getErrors().isEmpty()) { currentErrorHandlers = new LinkedList<ErrorService>(errorHandlers); } if (currentErrorHandlers != null) { // Do this next call OUTSIDE of the lock Utilities.handleErrors(results, currentErrorHandlers); } SortedSet<ServiceHandle<?>> retVal = new TreeSet<ServiceHandle<?>>(HANDLE_COMPARATOR); for (ActiveDescriptor<?> candidate : results.getResults()) { retVal.add(getServiceHandle(candidate)); } return new LinkedList<ServiceHandle<?>>(retVal); }
@Override public List<ServiceHandle<?>> getAllServiceHandles( Filter searchCriteria) throws MultiException { checkState(); NarrowResults results; LinkedList<ErrorService> currentErrorHandlers = null; List<SystemDescriptor<?>> candidates = ReflectionHelper.cast(getDescriptors(searchCriteria)); ImmediateResults immediate = narrow(this, candidates, null, null, null, false, false, null, searchCriteria); results = immediate.getTimelessResults(); if (!results.getErrors().isEmpty()) { currentErrorHandlers = new LinkedList<ErrorService>(errorHandlers); } if (currentErrorHandlers != null) { // Do this next call OUTSIDE of the lock Utilities.handleErrors(results, currentErrorHandlers); } SortedSet<ServiceHandle<?>> retVal = new TreeSet<ServiceHandle<?>>(HANDLE_COMPARATOR); for (ActiveDescriptor<?> candidate : results.getResults()) { retVal.add(getServiceHandle(candidate)); } return new LinkedList<ServiceHandle<?>>(retVal); }
@Override public List<ServiceHandle<?>> getAllServiceHandles( Filter searchCriteria) throws MultiException { checkState(); NarrowResults results; LinkedList<ErrorService> currentErrorHandlers = null; List<SystemDescriptor<?>> candidates = ReflectionHelper.cast(getDescriptors(searchCriteria)); ImmediateResults immediate = narrow(this, candidates, null, null, null, false, false, null, searchCriteria); results = immediate.getTimelessResults(); if (!results.getErrors().isEmpty()) { currentErrorHandlers = new LinkedList<ErrorService>(errorHandlers); } if (currentErrorHandlers != null) { // Do this next call OUTSIDE of the lock Utilities.handleErrors(results, currentErrorHandlers); } SortedSet<ServiceHandle<?>> retVal = new TreeSet<ServiceHandle<?>>(HANDLE_COMPARATOR); for (ActiveDescriptor<?> candidate : results.getResults()) { retVal.add(getServiceHandle(candidate)); } return new LinkedList<ServiceHandle<?>>(retVal); }
Utilities.handleErrors(results, currentErrorHandlers);
private IgdValue igdCacheCompute(final IgdCacheKey key) { final List<SystemDescriptor<?>> candidates = getDescriptors(key.filter, key.onBehalfOf, true, false, true); final ImmediateResults immediate = narrow(ServiceLocatorImpl.this, // locator candidates, // candidates key.contractOrImpl, // requiredType key.name, // name key.onBehalfOf, // injectee true, // onlyOne true, // doValidation null, // cachedResults key.filter, // filter key.qualifiers); // qualifiers final NarrowResults results = immediate.getTimelessResults(); if (!results.getErrors().isEmpty()) { Utilities.handleErrors(results, new LinkedList<ErrorService>(errorHandlers)); throw new ComputationErrorException(new IgdValue(results, immediate)); } return new IgdValue(results, immediate); }
Utilities.handleErrors(results, currentErrorHandlers);
private IgdValue igdCacheCompute(final IgdCacheKey key) { final List<SystemDescriptor<?>> candidates = getDescriptors(key.filter, key.onBehalfOf, true, false, true); final ImmediateResults immediate = narrow(ServiceLocatorImpl.this, // locator candidates, // candidates key.contractOrImpl, // requiredType key.name, // name key.onBehalfOf, // injectee true, // onlyOne true, // doValidation null, // cachedResults key.filter, // filter key.qualifiers); // qualifiers final NarrowResults results = immediate.getTimelessResults(); if (!results.getErrors().isEmpty()) { Utilities.handleErrors(results, new LinkedList<ErrorService>(errorHandlers)); throw new ComputationErrorException(new IgdValue(results, immediate)); } return new IgdValue(results, immediate); }
private IgdValue igdCacheCompute(final IgdCacheKey key) { final List<SystemDescriptor<?>> candidates = getDescriptors(key.filter, key.onBehalfOf, true, false, true); final ImmediateResults immediate = narrow(ServiceLocatorImpl.this, // locator candidates, // candidates key.contractOrImpl, // requiredType key.name, // name key.onBehalfOf, // injectee true, // onlyOne true, // doValidation null, // cachedResults key.filter, // filter key.qualifiers); // qualifiers final NarrowResults results = immediate.getTimelessResults(); if (!results.getErrors().isEmpty()) { Utilities.handleErrors(results, new LinkedList<ErrorService>(errorHandlers)); throw new ComputationErrorException(new IgdValue(results, immediate)); } return new IgdValue(results, immediate); }
private IgdValue igdCacheCompute(final IgdCacheKey key) { final List<SystemDescriptor<?>> candidates = getDescriptors(key.filter, key.onBehalfOf, true, false, true); final ImmediateResults immediate = narrow(ServiceLocatorImpl.this, // locator candidates, // candidates key.contractOrImpl, // requiredType key.name, // name key.onBehalfOf, // injectee true, // onlyOne true, // doValidation null, // cachedResults key.filter, // filter key.qualifiers); // qualifiers final NarrowResults results = immediate.getTimelessResults(); if (!results.getErrors().isEmpty()) { Utilities.handleErrors(results, new LinkedList<ErrorService>(errorHandlers)); throw new ComputationErrorException(new IgdValue(results, immediate)); } return new IgdValue(results, immediate); }
Utilities.handleErrors(results, currentErrorHandlers);
Utilities.handleErrors(results, currentErrorHandlers);
Utilities.handleErrors(results, currentErrorHandlers);
Utilities.handleErrors(results, currentErrorHandlers);
Utilities.handleErrors(results, currentErrorHandlers);
Utilities.handleErrors(results, currentErrorHandlers);