KeyValuePair kvp = new KeyValuePair(tokens[0], tokens[1]); if (!validateRecordKey(kvp.getKey())) { badKey.add(kvp); } else if (!validateRecord(kvp.getValue())) { badValue.add(kvp); } else {
final KeyValuePair kvHungry = new KeyValuePair("hunger", "Y"); boolean hungry = false; for (KeyValuePair pair : pairs) hungry |= pair.equals(kvHungry);
MediaConstraints pcConstraints = signalingParameters.pcConstraints; // pcConstraints.optional.add(new KeyValuePair("RtpDataChannels", "false")); pcConstraints.optional.add(new KeyValuePair("DtlsSrtpKeyAgreement", "true")); pc = factory.createPeerConnection(signalingParameters.iceServers, pcConstraints, pcObserver);
@ClientCacheEntryCreated public void processCacheEntryCreated(ClientCacheEntryCustomEvent<byte[]> event) { emitSessionCreatedEvent(readEvent(event).getValue()); }
void start(SearchFactoryHandler searchFactoryHandler) { if (indexedEntities != null) { throw new IllegalStateException("Cannot start internal cache unless we are in autodetect mode"); } if (searchFactoryHandler == null) { throw new IllegalArgumentException("null argument not allowed"); } this.searchFactoryHandler = searchFactoryHandler; startInternalCache(); knownClassesCache.addListener(searchFactoryHandler.getCacheListener(), key -> key.getKey().equals(cacheName)); }
KeyValuePair kv = new KeyValuePair(); kv.setKey(initialKey); Value v = new Value(); kv.setValue(v); if(depth==0)
choiceBox .getItems().add(new KeyValuePair("1", "Active"));
@ClientCacheEntryRemoved public void processCacheEntryDestroyed(ClientCacheEntryCustomEvent<byte[]> event) { emitSessionDestroyedEvent(readEvent(event).getValue()); }
void start(SearchFactoryHandler searchFactoryHandler) { if (indexedEntities != null) { throw new IllegalStateException("Cannot start internal cache unless we are in autodetect mode"); } if (searchFactoryHandler == null) { throw new IllegalArgumentException("null argument not allowed"); } this.searchFactoryHandler = searchFactoryHandler; startInternalCache(); knownClassesCache.addListener(searchFactoryHandler.getCacheListener(), key -> key.getKey().equals(cacheName)); }
@Override public Flowable<K> publishKeys(Predicate<? super K> filter) { return Flowable.using(() -> { EntityManager emStream = emf.createEntityManager(); Session session = emStream.unwrap(Session.class); Criteria criteria = session.createCriteria(configuration.entityClass()).setProjection(Projections.id()).setReadOnly(true); if (setFetchSizeMinInteger) { criteria.setFetchSize(Integer.MIN_VALUE); } ScrollableResults results = criteria.scroll(ScrollMode.FORWARD_ONLY); return new KeyValuePair<>(emStream, results); }, kvp -> { ScrollableResults results = kvp.getValue(); return Flowable.fromIterable(() -> new ScrollableResultsIterator(results, filter) ); }, kvp -> { try { kvp.getValue().close(); } finally { kvp.getKey().close(); } }); }
pcConstraints.optional.add(new KeyValuePair("DtlsSrtpKeyAgreement", "true")); pcConstraints.optional.add(new KeyValuePair("RtpDataChannels", "true"));
@ClientCacheEntryExpired public void processCacheEntryExpired(ClientCacheEntryCustomEvent<byte[]> event) { emitSessionExpiredEvent(readEvent(event).getValue()); }
protected void customDecodeKey(ChannelHandlerContext ctx, ByteBuf buffer) throws IOException { Channel ch = ctx.channel(); switch (header.operation) { case AppendRequest: case PrependRequest: case IncrementRequest: case DecrementRequest: key = readKey(buffer).getKey(); checkpoint(MemcachedDecoderState.DECODE_PARAMETERS); break; case FlushAllRequest: flushAll(buffer, ch, true); // With params break; default: throw new IllegalArgumentException("Operation " + header.operation + " not supported!"); } }
private setState(List<KeyValuePair> pairs) { for (KeyValuePair pair : pairs) { String key = pair.getKey(); String value = pair.getValue(); hungry = (key.equals("hunger") && value.equals("Y")) || hungry; sleepy = (key.equals("tired") && value.equals("Y")) || sleepy; happy = (key.equals("sad") && value.equals("N")) || happy; } }
return new KeyValuePair<>(connection, connection.prepareStatement(sql)); }, kvp -> { PreparedStatement ps = kvp.getValue(); int offset = 1; ps.setLong(offset, timeService.wallClockTime()); return function.apply(rs); }, kvp -> { JdbcUtil.safeClose(kvp.getValue()); connectionFactory.releaseConnection(kvp.getKey()); });
List<KeyValuePair> data = new ArrayList<>(); data.add(new KeyValuePair("field1", "123")); data.add(new KeyValuePair("field2", "XYX"));
@CacheEntryModified public void modified(CacheEntryModifiedEvent<KeyValuePair<String, Class>, Boolean> e) { if (!e.isOriginLocal() && !e.isPre() && e.getValue()) { handleClusterRegistryRegistration(e.getKey().getValue()); } } }