id
stringlengths
7
14
text
stringlengths
1
37.2k
143078890_1
static void processRowResult(Result result, Sketches sketches) { // System.out.println(result.toString()); long rowSize = 0; int columnCount = 0; for (Cell cell : result.rawCells()) { rowSize += estimatedSizeOfCell(cell); columnCount += 1; } sketches.rowSizeSketch.update(rowSize); sketches.columnC...
143127772_1
@Override public void sort(ETLBucket bucket) { bucket.getParallelRows().addAll(batchGroup(bucket.getRows())); }
143152220_23
public boolean match(String route) { for (String originalRoute : this.originalRoute) { if (this.matchShell(originalRoute, route)) { String routeWithoutShell = this.getRouteWithoutShell(originalRoute); String startRouteWithoutShell = this.getRouteWithoutShell(route); ...
143201223_37
public static org.joda.time.Duration parseDuration(String value) { return parseJodaDuration(value); }
143267111_2
static FindPolicyQueryResult constructResult(List<PolicyView> policies) { return new FindPolicyQueryResult( policies.stream() .map(PolicyListItemDtoAssembler::map) .sorted(Comparator.comparing(PolicyListItemDto::getDateFrom, Comparator.nullsLast(Comparator.reverse...
143269609_0
public Flowable<List<Repos>> get(ReposParam param) { return reposRepository .all(param) .subscribeOn(executionThread) .observeOn(postExecutionThread); }
143296627_3
@Override public int userRegister(TUser user) { //设置盐和密码 PasswordUtils.encryptPassword(user); return userExt.insertSelective(user); }
143445981_2
@FunctionName("OddOrEvenQueue") public void queueHandler( @QueueTrigger(name = "myNumber", queueName = "numbers", connection = "AzureWebJobsStorage") String myNumber, final ExecutionContext context ) throws NumberFormatException, ClientProtocolException, IOException { try { context.getLogger().i...
143681096_3
@Override public void verify(HttpServletRequest request, CEKRequestMessage requestMessage, String requestJson, SystemContext system) { String baseEncoded64Signature = request.getHeader(CLOVA_SIGNATURE_REQUEST_HEADER); if (StringUtils.isBlank(baseEncoded64Signature)) { throw new Securi...
143691055_0
public int run(String[] args) throws Exception { if (args.length != 2) { System.err.printf("Usage: %s [generic options] <input> <output>\n", getClass().getSimpleName()); ToolRunner.printGenericCommandUsage(System.err); //打印命令行应使用的参数信息 return -1; } Job job = new Job(getConf(), "Max ...
143692325_7
public void savePreferredNotificationChannels(Customer customer, List<NotificationType> notificationChannels) { customer.setPreferredNotificationChannels(notificationChannels); customerRepository.save(customer); }
143705035_67
public static Server create(String serverType) throws EtiqetException { Server instance; try { instance = (Server) Class.forName(serverType).newInstance(); } catch (Exception e) { LOG.error(ERROR_CREATING_SERVER + serverType, e); throw new EtiqetException(ERROR_CREATING_SERVER + serv...
143744066_0
@Override public DLock getLock(String name) { return new RedisDistLock(UUIDUtils.getTrimId(), name, redisTemplate); }
143813238_0
public ResObject send(@RequestBody Map<String,String> map) { try { SimpleMailMessage email = new SimpleMailMessage(); email.setFrom(from); email.setSubject(map.get("title")); email.setText(map.get("content")); email.setTo(map.get("to")); javaMailSender.send(email...
143836525_16
public ConfigAttribute findConfigAttributesByUrl(HttpServletRequest authRequest) { return this.resourceConfigAttributes.keySet().stream() .filter(requestMatcher -> requestMatcher.matches(authRequest)) .map(requestMatcher -> this.resourceConfigAttributes.get(requestMatcher)) .peek...
143847547_7
public UiResponse findByInstanceId(HttpServletRequest request, String instanceId) { Map<String, AppEntity> appMap=appService.getCacheData(); UiResponse uiResponse = new UiResponse(); Long count; List<CombinedInstanceDto> instanceList; count = uiInstanceRepository.instanceCount(instanceId); insta...
143854187_2
@Override public BigInteger asInteger() { if (!(value.startsWith(HEX_PREFIX) || value.startsWith('-' + HEX_PREFIX))) { throw new RpcValueException("The value is not hex string."); } try { String sign = ""; if (value.charAt(0) == '-') { sign = value.substring(0, 1); ...
143891340_2
@Override // Mark: Is this correct? Should I be doing something additional? public void destroy(T instance, final CreationalContext<T> context) { if (clazz.equals(Configuration.class)) { logger.info("Shutting down Axon configuration."); ((Configuration) instance).shutdown(); } instance = nu...
143909323_8
public static Object getProxy(Object realSubject) { // 我们要代理哪个真实对象,就将该对象传进去,最后是通过该真实对象来调用其方法的 InvocationHandler handler = new DynamicProxy(realSubject); return Proxy.newProxyInstance(handler.getClass().getClassLoader(), realSubject.getClass().getInterfaces(), handler); }
143960133_1
@PostMapping(value = "add", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) @ApiOperation(value = "新增账户", notes = "返回新生成的主键id") public ResultBean<Integer> add(@Valid @RequestBody Account account) { return new ResultBean<>(accountService.insert(account)); }
143965831_7
public void useSpeaker() { mRtcEngine.setEnableSpeakerphone(true); }
144020195_62
@Override public IngestionResult ingestFromStream(StreamSourceInfo streamSourceInfo, IngestionProperties ingestionProperties) throws IngestionClientException, IngestionServiceException { Ensure.argIsNotNull(streamSourceInfo, "streamSourceInfo"); Ensure.argIsNotNull(ingestionProperties, "ingestionProperties"); ...
144143524_29
@Override public Iterator<K> iterator() { return new Iterator<>() { private final AbstractIterator<K, ?> itr = map().iterator(); @Override public boolean hasNext() { return itr.hasNext(); } @Override public K next() { return itr.next().getKey...
144361208_1
public int getCalled() { return called; }
144435698_5
@Override public Completes<OrganizationState> renameTo(final String name) { return apply(new OrganizationRenamed(state.organizationId, name), () -> state); }
144524134_0
public AuthCodeVO authorizeUsingPOST(ClientVO clientVO) throws ApiException { ApiResponse<AuthCodeVO> resp = authorizeUsingPOSTWithHttpInfo(clientVO); return resp.getData(); }
144561165_1
@RequestMapping("/save") public boolean save() { boolean result = false; User user = new User(); user.setName("Adam"); user.setAge(19); user.setCtime(new Date().getTime()); user.setPwd("123456"); userRepository.save(user); result = user.getId() > 0; System.out.println("userId:" + use...
144585798_13
public void toTS(Metadata metadata) { toTS(metadata, new ArrayDeque<>()); }
144699297_0
public boolean isValidSegment() throws IgSegmentationException { if (!initialized) this.validateProperties(); try { return this.targetNodeAddress.isReachable(this.localNodeNetworkInterface, this.ttl, this.timeout); } catch (IOException e) { throw new IgSegmentationException("Fai...
144737388_0
public Flow<String, String, NotUsed> addIndexFlow() { final Pair<Integer, String> seed = Pair.create(0, "start"); return Flow.of(String.class) .scan(seed, (acc, message) -> { Integer index = acc.first(); return Pair.create(index + 1, String.format("index: %s,...
144749542_0
static String getMacAddr(String mac) { log.warn("searching mac in string '{}'", mac); if (mac == null) { return ""; } Pattern p = Pattern.compile("(?:[0-9a-fA-F]:?){12}"); Matcher m = p.matcher(mac); if (m.find()) { return m.group(); } else { return ""; } }
144786483_5
public static JsonObject main(JsonObject args) { JsonObject response = new JsonObject(); EngagementStore store = new EngagementStore(args, "engagements"); String[] tags = new String[] {"java", "cloud"}; Engagement jfokus = new Engagement( "JFokus 2019", "Stockholm",new Date()); jfokus.setTags(tags...
144918163_8
public void flatten(TreeNode root) { if(root == null) return; Stack<TreeNode> s = new Stack<>(); s.push(root); TreeNode prev = null, curr = null; while(!s.isEmpty()){ curr = s.pop(); if(prev != null) {prev.right = curr; prev.left=null;} if(curr.right != null) s.push(curr.rig...
144974148_1
@SuppressWarnings("unchecked") public static <I, T extends I> T get(Class<I> clazz, IFactory factory) throws Exception { if (clazz == null) { return null; } if (factory == null) { factory = RouterComponents.getDefaultFactory(); } Object instance = getInstance(clazz, factory); Deb...
145032308_0
public static InetSocketAddress toIpAddress(String hostName, int port) { InetSocketAddress socketAddress; try { InetAddress address = InetAddress.getByName(hostName); String ipAddress = address.getHostAddress(); socketAddress = InetSocketAddress.createUnresolved(ipAddress, port); } catch (UnknownHostE...
145080847_2
public boolean matches(FileDescriptor other) { if (!StringUtils.equals(directory, other.directory)) { return false; } if (!StringUtils.equals(relativePath, other.relativePath)) { return false; } if (filename == null || other.filename == null) { return false; } String ...
145101610_0
public Map<Currency, Double> balances() { return balances; }
145104488_35
public TokenDetails getApplicationTokenDetails() { UserKey user = getRunOnBehalfOfUser(); return getApplicationTokenDetailsForUser(user); }
145126556_57
@Override public Response handleRequest(SQSEvent event, Context context) { logger = context.getLogger(); List<String> failedEvents = new ArrayList<>(); List<String> successfulTableNames = new ArrayList<>(); IMetaStoreClient metaStoreClient = null; try { ThriftHiveClient thriftHiveClient = thriftHiveClient...
145233455_12
public static PartitionTable createPartitionTable(BlockDeviceDriver blockDevice) throws IOException { for(PartitionTableCreator creator : partitionTables) { PartitionTable table = creator.read(blockDevice); if(table != null) { return table; } } thr...
145256500_13
@Nullable @Override public T get(CommandArgs arguments, List<? extends Annotation> modifiers) throws ArgumentException, ProvisionException { String name = arguments.next(); String test = simplify(name); for (T entry : enumClass.getEnumConstants()) { if (simplify(entry.name()).equalsIgnoreCase(test)) { ...
145264090_1
public static String showClassLoaderHierarchy(Object obj, String role, String delim, String tabText) { String s = "object of " + obj.getClass() + ": role is " + role + delim; return s + showClassLoaderHierarchy(obj.getClass().getClassLoader(), delim, tabText, 0); }
145392451_3
@Override public CommonPager<TccCompensationVO> listByPage(final CompensationQuery query) { CommonPager<TccCompensationVO> voCommonPager = new CommonPager<>(); final int currentPage = query.getPageParameter().getCurrentPage(); final int pageSize = query.getPageParameter().getPageSize(); int start = (currentPage - 1...
145393952_0
public static ParDePuntos parMasCercano(List<Punto2D> lista){ ParDePuntos p = null; List<Punto2D> puntosX; List<Punto2D> puntosY; Comparator<Punto2D> ordX = new Comparator<Punto2D>(){ @Override public int compare(Punto2D p1, Punto2D p2) { return p1.getX().compareTo(p2.getX()); } }; Comparator<Punto2D>...
145452341_0
public static void processFile(FileItem file, UserInteractionEventCallback callback) throws IOException { log.debug(String.format("Parsing %s", file.getName())); if (file.getContentType().startsWith("application/zip")) { ZipInputStream zip = new ZipInputStream(file.getInputStream()); ZipEntry ze; int first...
145659250_3
@Override public String getMessage() { return message; }
145711148_0
public static <InT, OutT> ProcessFunctionInvoker<InT, OutT> create(StreamingLedgerSpec<InT, OutT> spec) { final ClassLoader userClassLoader = classLoader(spec); final Class<?> generatedClass = CACHE.findOrInsert(userClassLoader, spec, () -> generateAndLoadClass(spec)); try { return createInstance(g...
145861384_0
@Override public Specification getSpecification() { return Specification.OPENAPI_V3; }
145862721_0
static List<TransformDescriptor> readProbes(String probesFile) throws IOException { if (probesFile == null || probesFile.trim().length() == 0) { probesFile = DEFAULT_CONFIG; } File file = new File(probesFile); List<String> lines = null; if (file.exists()) { lines = Files.readAllLines(file.toPath()); } else { ...
145960323_53
public boolean hasRecordAvailable() { maybeReadNext(); return nextRecord != null; }
146007026_1
public void selectImageDown() { Animation animation = new RotateAnimation(360, 0); animation.setDuration(1000); animation.setRepeatCount(0); animation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { Handle...
146009627_215
@Transactional(rollbackFor = Exception.class) public void inheritParticipantsFromAssignedObject(List<AcmParticipant> assignedObjectParticipants, List<AcmParticipant> originalAssignedObjectParticipants, AcmContainer acmContainer, boolean restricted) { if (acmContainer == null) { log.warn("Null co...
146066191_2
@Override public void getGeese(GetGeeseRequest request, StreamObserver<GeeseResponse> responseObserver) { GeeseResponse.Builder response = GeeseResponse.newBuilder(); int gooseWidth = Integer.max(request.getGooseWidth(), DEFAULT_GOOSE_WIDTH); IntStream.range(0, request.getLinesCount())...
146223479_3
boolean isSecret(String name) { return name.toLowerCase().contains("secret"); }
146285827_105
public boolean isEnabled() { return enabled; }
146294560_3
@Override protected ThingHandler createHandler(Thing thing) { ThingTypeUID thingTypeUID = thing.getThingTypeUID(); if (thingTypeUID.equals(TechemBindingConstants.THING_TYPE_TECHEM_HKV45) || thingTypeUID.equals(TechemBindingConstants.THING_TYPE_TECHEM_HKV61) || thingTypeUID.equals(Techem...
146386097_0
static FeatureGraph createFeatureGraph( JCTree.JCCompilationUnit compilationUnit, Context context) { FeatureGraph featureGraph = new FeatureGraph( compilationUnit.getSourceFile().getName(), compilationUnit.endPositions, compilationUnit.lineMap); AstScanner.addToGraph(compilat...
146397561_25
public ModelMBeanInfo getMBeanInfo(Object defaultManagedBean, Object customManagedBean, String objectName) throws JMException { if ((defaultManagedBean == null && customManagedBean == null) || objectName == null) return null; // skip proxy classes if (defaultManagedBean != null && Proxy.isProxyClass(defaultM...
146503569_0
private String get(URL url) throws IOException { final HttpURLConnection conn = (HttpURLConnection) url.openConnection(); if (conn.getResponseCode() == HttpStatus.MOVED_PERMANENTLY.value()) { return get(new URL(conn.getHeaderField("Location"))); } try (final InputStreamReader reader = new InputS...
146510094_385
@Override public String toSqlConstraint(String quoteString, DbProduct dbProduct) { if (quoteString == null) { throw new RuntimeException("Quote string cannot be null"); } if (dbProduct == null) { throw new RuntimeException(String.format( "DbProduct cannot be null for partitio...
146525109_27
public final LeaveSharedAlbumResponse leaveSharedAlbum(String shareToken) { LeaveSharedAlbumRequest request = LeaveSharedAlbumRequest.newBuilder().setShareToken(shareToken).build(); return leaveSharedAlbum(request); }
146535797_375
public void setEdgeItemsCenteringEnabled(boolean isEnabled) { mEdgeItemsCenteringEnabled = isEnabled; if (mEdgeItemsCenteringEnabled) { if (getChildCount() > 0) { setupCenteredPadding(); } else { mCenterEdgeItemsWhenThereAreChildren = true; } } else { ...
146574601_1
public static void parseServiceMetadataString(String metadataField, Map<String, List<String>> metadata) { StringBuffer sb = new StringBuffer(metadataField); int dot = 0; int nextEquals = sb.indexOf(EQUALS_STRING, dot); while (nextEquals > 0) { String key = sb.substring(dot, nextEquals); ...
146578832_1
@Override protected URL findResource(String name) { URL u = getParent().getResource(prefix + name); if (u != null) { try { jars.add(new JarFile(new File(toJarUrl(u).toURI()))); } catch (URISyntaxException | IOException ex) { Logger.getLogger(ParallelWorldClassLoader.class...
146582041_0
public CredentialManager getCredentialManager() { return credentialManager; }
146633589_41
public static String stripEnd(final String str, final String stripChars) { int end; if (str == null || (end = str.length()) == 0) { return str; } if (stripChars == null) { while (end != 0 && Character.isWhitespace(str.charAt(end - 1))) { end--; } } else if (strip...
146691974_2
public static <T extends Model> T transfer(Class<T> target, String filedName, Object value) { if (filedName == null || value == null){ throw new RuntimeException("argument is null!") ; } T obj = null; try { obj = target.newInstance(); filedName = methodName(filedName) ; M...
146856200_0
public static Date getFinalFireTime(String crontabExp, Date date) throws ParseException { CronExpression expression = new CronExpression(crontabExp); return expression.getNextValidTimeAfter(date != null ? date : new Date()); }
146924987_18
public static <T> FastSpecificDatumReader<T> getFastSpecificDatumReader(Schema schema) { return (FastSpecificDatumReader<T>) getFastSpecificDatumReader(schema, schema); }
146941185_237
public void setAutomaticDataCollectionEnabled(boolean isEnabled) { // Update SharedPreferences, so that we preserve state across app restarts sharedPreferencesUtils.setBooleanPreference(AUTO_INIT_PREFERENCES, isEnabled); }
146983529_45
@Override public String convert(Object objValue) throws OperationException { if (objValue == null) { throw new OperationException(ErrorCode.DATATYPE_MISMATCH); } final String str = objValue.toString(); if (length > 0 && str.length() > length) { throw new OperationException(ErrorCode.DAT...
147038962_0
@Override public void run() { try { LogTrackerUtil.setContext(context); doRun(); } catch (LogTrackerException e) { Logger.warn("Context transfer failed", e); } catch (Exception e) { Logger.warn("Runnable exception occurred", e); } finally { LogTrackerUtil.clearCon...
147088517_2
public Object put(Object key_, Object value) { String key = key_ != null ? key_.toString() : null; String keyUpper = key_ != null ? key_.toString().toUpperCase() : null; if(!mapKey.containsKey(keyUpper)) { mapKey.put(keyUpper, key); } if(value instanceof BigDecimal) { value = value.toString(); } return ma...
147102058_5
public void generate() throws GeneratorException { Configuration freeMarkerConfiguration = new Configuration(); freeMarkerConfiguration.setClassForTemplateLoading(WebXmlSourceGenerator.class, "/templates/properties"); freeMarkerConfiguration.setDefaultEncoding("UTF-8"); Template template; ...
147162839_18
public Collection<JobExecution> jobExecutions(Optional<String> jobNameRegexp, Optional<String> exitCode, int maxNumberOfExecutionsPerJobName) { logger.debug("Getting job executions(jobNameRegexp={}, exitCode={}, maxNumberOfE...
147324252_17
public static Iterable<DataFactory> nodeData(final Charset encoding, Collection<Args.Option<File[]>> nodesFiles ) { return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles ) { @Override protected DataFactory underlyingObjectToObject( A...
147324963_118
public void startBlockChainDownload() { setDownloadData(true); // TODO: peer might still have blocks that we don't have, and even have a heavier // chain even if the chain block count is lower. final int blocksLeft = getPeerBlockHeightDifference(); if (blocksLeft >= 0) { for (final ListenerR...
147334432_0
public static Double simpleInterest(Double principal, Double rateOfInterest, Integer years){ Objects.requireNonNull(principal, "Principal cannot be null"); Objects.requireNonNull(rateOfInterest, "Rate of interest cannot be null"); Objects.requireNonNull(years, "Years cannot be null"); return ( pri...
147515517_4
public static void Sort(int[] array) { for (int i = 0; i < array.length - 1; i++) { int minIndex = i; for (int j = i + 1; j < array.length; j++) { if (array[j] < array[minIndex]) { minIndex = j; } } if (minIndex != i) { int temp = ...
147522483_135
@Override public ValidationResult validate(T t) { for (Validator<T> validator : validators) { ValidationResult result = validator.validate(t); if (result.isErroneous()) { debugLog(t, validator); validationListeners.forEach(listener -> listener.onValidationError(result)); return result; } } return crea...
147527545_2
@Override protected int getDataSourceKey() { return 1791; }
147608979_3
@Override public Resources findById(Long id) { return resourcesRepository.getOne(id); }
147637805_24
protected void detectGoals(String className, String methodName, Class<?>[] argumentClasses ,Type[] argumentTypes, List<InputCoverageTestFitness> goals){ for (int i=0; i<argumentTypes.length;i++){ Type argType = argumentTypes[i]; int typeSort = argType.getSort(); if(typeSort == Type.OBJECT) ...
147747963_305
@Override public void subscribe(final Subscriber<? super byte[]> subscriber) { subscribeInternal(subscriber); }
147802356_777
FP2Immutable sqr() { FP2 result = new FP2(fp2); result.sqr(); return new FP2Immutable(result); }
147809547_47
static <T> T newObjectFrom(String name, Class<T> type) throws Exception { try { final Class<?> clazz = LogManagerProperties.findClass(name); //This check avoids additional side effects when the name parameter //is a literal name and not a class name. if (type.isAssignableFrom(clazz))...
147911191_1
public <T> T eval(String script, ScriptContext scripCtx) throws ExecutionException, ScriptException { GroovyCompiledScript compiledScript = grvyCompileScriptCache.get(script); Object result; synchronized (compiledScript) { result = compiledScript.eval(scripCtx); } return (T) result; }
147922185_562
@Nullable public static Date getValue( @Nonnull IBaseHasExtensions resource ) { return BaseExtensionUtils.getDateValue( URL, resource ); }
147965914_0
public AddressesExistsResponse addressesCheckExistenceAndRequestHistoryNode(AddressBulkRequest addressRequest) { List<Hash> addressHashes = addressRequest.getAddresses(); LinkedHashMap<String, Boolean> addressHashToFoundStatusMap = new LinkedHashMap<>(); String historyNodeHttpAddress = getHistoryNodeHttpA...
147968892_2
@Override public double getBucketSumScore(BucketBehaviorEventsData bucketBehaviorEventsData) { BucketBehaviorEventsCalculator bucketCalculator = new BucketBehaviorEventsCalculator(bucketBehaviorEventsData); // Decay on case that this is the first event, or first access to data today if (bucketCalculator.dec...
147984736_17
@Override @LogMethod("添加收益分类") public Category appendCategory(String userId, String name) { AssertUtils.throwIf(exists(userId, name), BeeErrorConsts.CATEGORY_EXISTS); Category category = new Category(); category.setCreateTime(System.currentTimeMillis()); category.setId(IdUtil.simpleUUID()); category...
147999347_5
@Nonnull @Override public String[] getFileSuffixes() { String[] suffixes = filterEmptyStrings(configuration.getStringArray(ObjectiveCPlugin.FILE_SUFFIXES_KEY)); if (suffixes.length == 0) { suffixes = StringUtils.split(ObjectiveCPlugin.FILE_SUFFIXES_DEFVALUE, ","); } return suffixes; }
148116142_74
@Override public Integer getValue() { return Integer.valueOf(value); }
148398884_7
@Override public Float parse(final String... columns) { checkNotNull(columns, "No columns to parse from"); checkArgument(columns.length == 1, String.format("Expecting only one column, but got %d", columns.length)); final String value = columns[0]; checkArgument(!isNullOrEmpty(value), "Missing value to p...
148428318_2
public static TypeInformation convertToArray(String arrayTypeString) { Matcher matcher = matchCompositeType(arrayTypeString); final String errorMsg = arrayTypeString + "convert to array type error!"; Preconditions.checkState(matcher.find(), errorMsg); String normalizedType = normalizeType(matcher.grou...
148473211_2
public static Devon4jPackage of(String root, String application, String component, String layer, String scope, String detail) { String[] roots; if (root == null) { roots = new String[0]; } else { roots = root.split(REGEX_PKG_SEPARATOR); } String[] details; if (detail == null) { details = ne...
148480967_24
public final WorkbenchDialog showDialog(WorkbenchDialog dialog) { DialogControl dialogControl = dialog.getDialogControl(); dialogControl.setWorkbench(this); showOverlay(dialogControl, dialog.isBlocking()); return dialog; }
148496687_55
@Transactional public void syncSend(Integer id) throws InterruptedException { // 创建 Demo11Message 消息 Demo11Message message = new Demo11Message(); message.setId(id); // 同步发送消息 rabbitTemplate.convertAndSend(Demo11Message.EXCHANGE, Demo11Message.ROUTING_KEY, message); logger.info("[syncSend][发送编号:[...
148614148_0
public void sendEvent(@Nonnull final T event) { if(event == null) { throw new IllegalArgumentException("Null value is not allowed as an event"); } if(!canEmitEvents()) { if(limit == -1 || queuedEvents.size() < limit) { // drop new events that don't fit the queue queuedEvents.add(...
148617498_16
@Override public String getValue(String key) { if (key.startsWith(KEY_PREFIX)) { // in case we are about to configure ourselves we simply ignore that key return null; } TimedEntry entry = cache.get(key); if (entry == null || entry.isExpired()) { log.log(Level.FINE, "load {0}...