else {
final AtomicLong cardinality = new AtomicLong(0l);
cardinalities.put(key, cardinality);
for (final RepositoryConnection member : members) {
final StoreException source = SailUtil.isDebugEnabled() ? new StoreException() : null;
executor.execute(new Runnable() {
public void run() {
try {
Resource[] contexts = context == null ? new Resource[0] : new Resource[] { context };
long size = member.sizeMatch(subj, pred, obj, true, contexts);
if (size > 0) {
cardinality.getAndAdd(size);
}
}
catch (RuntimeException e) {
if (source != null) {
source.initCause(e);
exception = source;
}
else {
exception = e;
}
}
catch (StoreException e) {
if (source != null) {
source.initCause(e);
exception = source;
}
else {
exception = e;
}