/** * Check to see if this EntityMap contains a specified vertex. * * @param vertex the vertex to search for * @return {@code true} if the vertex is present in the entity mpa, otherwise * {@code false} */ public boolean containsVertex(final Object vertex) { return backingMap.containsKey(vertex); }
@Override public Set<String> getClaimsForScope(String scope) { if (scopesToClaims.containsKey(scope)) { return scopesToClaims.get(scope); } else { return new HashSet<>(); } }
/** * Complete the transaction, and remove all events from inflight list. * * @param transactionID */ public boolean completeTransaction(Long transactionID) { if (!inflightEvents.containsKey(transactionID)) { return false; } inflightEvents.removeAll(transactionID); inflightFileIDs.removeAll(transactionID); syncRequired = true; return true; }
if (!attributeByType.containsKey(abstractTypeName)) { builder.add(new FromSupertype(abstractTypeName, ImmutableList.<ValueAttribute>of()));
for (ExpressionTree exception : thrown) { Symbol sym = getSymbol(exception); if (exceptionsBySuper.containsKey(sym)) { Set<ExpressionTree> sub = exceptionsBySuper.get(sym); messages.add(
(Collection<FlumeEventPointer>) transactionMap.remove(trans); if (((Commit) record).getType() == TransactionEventRecord.Type.TAKE.get()) { if (inflightTakes.containsKey(trans)) { if (pointers == null) { pointers = Sets.newHashSet();
if (((Commit) record).getType() == TransactionEventRecord.Type.TAKE.get()) { if (inflightTakes.containsKey(trans)) { if (pointers == null) { pointers = Sets.newHashSet();
if (uncommittedPuts.containsKey(record.getTransactionID())) { uncommittedPuts.removeAll(record.getTransactionID()); } else {
/** * Returns <code>true</code> if the If-Non-Match option is present or <code>false</code> if there is * no such option present in this {@link CoapRequest}. * * @return <code>true</code> if the If-Non-Match option is present or <code>false</code> if there is * no such option present in this {@link CoapRequest}. */ public boolean isIfNonMatchSet() { return options.containsKey(IF_NONE_MATCH); }
/** * Check to see if this EntityMap contains a specified vertex. * * @param vertex the vertex to search for * @return {@code true} if the vertex is present in the entity mpa, otherwise * {@code false} */ public boolean containsVertex(final Object vertex) { return backingMap.containsKey(vertex); }
/** * Checks if the dispatcher has a listener for the specific event type. * @param eventType The event type. * @return <code>true</code> if there is a listener for the specific type, * <code>false</code> otherwise. */ public boolean hasListenerFor(Enum<?> eventType) { return listeners.containsKey(eventType); }
@Override public Set<String> getClaimsForScope(String scope) { if (scopesToClaims.containsKey(scope)) { return scopesToClaims.get(scope); } else { return new HashSet<>(); } }
/** * {@inheritDoc} */ @Override public Set<FieldSemantics> getFieldSemantics(Field field) { return fieldSemanticsMap.containsKey(field) ? fieldSemanticsMap.get(field) : Collections.emptySet(); }
public void stateChanged(TezVertexID vertexId, VertexStateUpdate vertexStateUpdate) { writeLock.lock(); try { lastKnowStatesMap.put(vertexId, vertexStateUpdate); if (vertexListeners.containsKey(vertexId)) { sendStateUpdate(vertexId, vertexStateUpdate); } } finally { writeLock.unlock(); } }
public int size(String id) { String key = key(id); if (singleProperties.containsKey(key)) { return 1; } else { if (multiProperties.containsKey(key)) { return multiProperties.get(key).size(); } } return 0; }
/** * Returns the value of the URI host option or a literal representation of the recipients IP address if the URI * host option is not present in this {@link CoapRequest}. * * @return the value of the URI host option or <code>null</code> if the URI * host option is not present in this {@link CoapRequest}. */ public String getUriHost() { if (options.containsKey(URI_HOST)) return ((StringOptionValue) options.get(URI_HOST).iterator().next()).getDecodedValue(); return null; }
private void addWatch(final Address addr, final ActorRef ref) { if (!watchedActors.containsKey(ref)) { getContext().watch(ref); LOG.debug("Watching {}", ref); } watchedActors.put(ref, addr); }
private static void buildPluginNames(SetMultimap<String, Class> info, Properties properties) { for (String name : properties.stringPropertyNames()) { List<Class> classList = classList(name, properties.getProperty(name)); if (info.containsKey(name)) { throw new GenerationException("duplicate name in plugins: " + name); } info.putAll(name, classList); } }
public static String getSortOfVar(KVariable k, VarInfo vars) { if (vars.vars.containsKey(k)) { String varName = vars.vars.get(k).iterator().next(); if (vars.listVars.containsKey(varName)) { return vars.listVars.get(varName).name(); } } if (k.att().contains("cellSort")) { return Sorts.K().toString(); } return k.att().getOptional(Sort.class).orElse(Sorts.K()).toString(); }
private void removeWatch(final Address addr, final ActorRef ref) { watchedActors.remove(ref, addr); if (!watchedActors.containsKey(ref)) { getContext().unwatch(ref); LOG.debug("No longer watching {}", ref); } }