com.hurence.logisland.component.PropertyValue.asBoolean()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(56)

本文整理了Java中com.hurence.logisland.component.PropertyValue.asBoolean()方法的一些代码示例,展示了PropertyValue.asBoolean()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PropertyValue.asBoolean()方法的具体详情如下:
包路径:com.hurence.logisland.component.PropertyValue
类名称:PropertyValue
方法名:asBoolean

PropertyValue.asBoolean介绍

暂无

代码示例

代码示例来源:origin: com.hurence.logisland/logisland-cyber-security-plugin

@Override
public void init(final ProcessContext context)
{
  debug = context.getPropertyValue(DEBUG_PROPERTY).asBoolean();
  if (debug) {
    logger.debug("Initializing PCap Processor");
  }
}

代码示例来源:origin: com.hurence.logisland/logisland-web-analytics-plugin

@Override
public void init(final ProcessContext context) {
  debug = context.getPropertyValue(CONFIG_DEBUG).asBoolean();
  /**
   * Get source of traffic service (aka Elasticsearch service) and the cache
   */
  super.init(context);
  cacheService = context.getPropertyValue(CONFIG_CACHE_SERVICE).asControllerService(CacheService.class);
  if(cacheService == null) {
    logger.error("Cache service is not initialized!");
  }
}

代码示例来源:origin: com.hurence.logisland/logisland-useragent-plugin

logger.debug("Initializing User-Agent Processor");
debug = context.getPropertyValue(DEBUG).asBoolean();
userAgentField = context.getPropertyValue(USERAGENT_FIELD).asString();
userAgentKeep = context.getPropertyValue(USERAGENT_KEEP).asBoolean();
useCache = context.getPropertyValue(CACHE_ENABLED).asBoolean();
cacheSize = context.getPropertyValue(CACHE_SIZE).asInteger();
String tmp = context.getPropertyValue(FIELDS_TO_RETURN).asString();
selectedFields = Arrays.asList(tmp.split(",")).stream().map(String::trim).collect(Collectors.toList());
confidenceEnabled = context.getPropertyValue(CONFIDENCE_ENABLED).asBoolean();
ambiguityEnabled = context.getPropertyValue(AMBIGUITY_ENABLED).asBoolean();

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

@Override
public void init(final ProcessContext context) {
  this.fieldsNameMapping = getFieldsNameMapping(context);
  this.nbSplitLimit = context.getPropertyValue(NB_SPLIT_LIMIT).asInteger();
  this.isEnabledSplitCounter = context.getPropertyValue(ENABLE_SPLIT_COUNTER).asBoolean();
  this.splitCounterSuffix = context.getPropertyValue(SPLIT_COUNTER_SUFFIX).asString();
}

代码示例来源:origin: com.hurence.logisland/logisland-enrichment-plugin

protected void processIp(Record record, String ip, ProcessContext context) {
  debug = context.getPropertyValue(CONFIG_DEBUG).asBoolean();

代码示例来源:origin: com.hurence.logisland/logisland-enrichment-plugin

hierarchical = propertyValue.asBoolean();

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

final String valueRegexString = context.getPropertyValue(VALUE_REGEX).asString();
final String eventType = context.getPropertyValue(RECORD_TYPE).asString();
final boolean keepRawContent = context.getPropertyValue(KEEP_RAW_CONTENT).asBoolean();
final Pattern valueRegex = Pattern.compile(valueRegexString);

代码示例来源:origin: com.hurence.logisland/logisland-redis_4-client-service

private static JedisPoolConfig createJedisPoolConfig(final ControllerServiceInitializationContext context) {
  final JedisPoolConfig poolConfig = new JedisPoolConfig();
  poolConfig.setMaxTotal(context.getPropertyValue(RedisUtils.POOL_MAX_TOTAL).asInteger());
  poolConfig.setMaxIdle(context.getPropertyValue(RedisUtils.POOL_MAX_IDLE).asInteger());
  poolConfig.setMinIdle(context.getPropertyValue(RedisUtils.POOL_MIN_IDLE).asInteger());
  poolConfig.setBlockWhenExhausted(context.getPropertyValue(RedisUtils.POOL_BLOCK_WHEN_EXHAUSTED).asBoolean());
  poolConfig.setMaxWaitMillis(context.getPropertyValue(RedisUtils.POOL_MAX_WAIT_TIME).asTimePeriod(TimeUnit.MILLISECONDS));
  poolConfig.setMinEvictableIdleTimeMillis(context.getPropertyValue(RedisUtils.POOL_MIN_EVICTABLE_IDLE_TIME).asTimePeriod(TimeUnit.MILLISECONDS));
  poolConfig.setTimeBetweenEvictionRunsMillis(context.getPropertyValue(RedisUtils.POOL_TIME_BETWEEN_EVICTION_RUNS).asTimePeriod(TimeUnit.MILLISECONDS));
  poolConfig.setNumTestsPerEvictionRun(context.getPropertyValue(RedisUtils.POOL_NUM_TESTS_PER_EVICTION_RUN).asInteger());
  poolConfig.setTestOnCreate(context.getPropertyValue(RedisUtils.POOL_TEST_ON_CREATE).asBoolean());
  poolConfig.setTestOnBorrow(context.getPropertyValue(RedisUtils.POOL_TEST_ON_BORROW).asBoolean());
  poolConfig.setTestOnReturn(context.getPropertyValue(RedisUtils.POOL_TEST_ON_RETURN).asBoolean());
  poolConfig.setTestWhileIdle(context.getPropertyValue(RedisUtils.POOL_TEST_WHILE_IDLE).asBoolean());
  return poolConfig;
}

代码示例来源:origin: com.hurence.logisland/logisland-cyber-security-plugin

final boolean enrichRecord = context.getPropertyValue(ENRICH_RECORD).asBoolean();
if (debug)

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

boolean addRootRecord = context.getPropertyValue(KEEP_ROOT_RECORD).asBoolean();
boolean includePosition = context.getPropertyValue(INCLUDE_POSITION).asBoolean();
List<String> concatFields = context.getPropertyValue(CONCAT_FIELDS).isSet() ?
    Arrays.asList(context.getPropertyValue(CONCAT_FIELDS).asString().split(",")) :
    Collections.emptyList();
String concatSeparator = context.getPropertyValue(CONCAT_SEPARATOR).asString();
boolean copyRootRecordFields = context.getPropertyValue(COPY_ROOT_RECORD_FIELDS).asBoolean();
List<Record> outputRecords = new ArrayList<>();

代码示例来源:origin: com.hurence.logisland/logisland-solr-client-service-api

SolrClient client;
final Boolean isCloud = context.getPropertyValue(SOLR_CLOUD).asBoolean();
final String connectionString = context.getPropertyValue(SOLR_CONNECTION_STRING).asString();
final String collection = context.getPropertyValue(SOLR_COLLECTION).asString();

代码示例来源:origin: com.hurence.logisland/logisland-enrichment-plugin

protected void processIp(Record record, String ip, ProcessContext context) {
  overwrite = context.getPropertyValue(CONFIG_OVERWRITE_FQDN).asBoolean();
  cacheValidityPeriodSec = (long)context.getPropertyValue(CONFIG_CACHE_MAX_TIME).asInteger();
  resolutionTimeoutMs = (long)context.getPropertyValue(CONFIG_RESOLUTION_TIMEOUT).asInteger();
  debug = context.getPropertyValue(CONFIG_DEBUG).asBoolean();

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

if (!context.getPropertyValue(ALLOW_OVERWRITE).asBoolean()) {
  validationResults.add(
      new ValidationResult.Builder()

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

Boolean allowNoBrace = context.getPropertyValue(ALLOw_NO_BRACE).asBoolean();
Integer maxPreparedStatements = context.getPropertyValue(MAX_PREPARED_STATEMENTS).asInteger();

代码示例来源:origin: com.hurence.logisland/logisland-web-analytics-plugin

final String FLAT_SEPARATOR           = "_";
final String referer_field            = context.getPropertyValue(REFERER_FIELD).asString();
final boolean hierarchical             = context.getPropertyValue(HIERARCHICAL).asBoolean();

代码示例来源:origin: com.hurence.logisland/logisland-solr_6_4

/**
 * Instantiate Chronix Client. This should be called by subclasses' @OnScheduled method to create a client
 * if one does not yet exist. If called when scheduled, closeClient() should be called by the subclasses' @OnStopped
 * method so the client will be destroyed when the processor is stopped.
 *
 * @param context The context for this processor
 * @throws ProcessException if an error occurs while creating an Chronix client
 */
protected void createSolrClient(ControllerServiceInitializationContext context) throws ProcessException {
  if (solr != null) {
    return;
  }
  // create a solr client
  final boolean isCloud = context.getPropertyValue(SOLR_CLOUD).asBoolean();
  final String connectionString = context.getPropertyValue(SOLR_CONNECTION_STRING).asString();
  final String collection = context.getPropertyValue(SOLR_COLLECTION).asString();
  if (isCloud) {
    //logInfo("creating solrCloudClient on $solrUrl for collection $collection");
    CloudSolrClient cloudSolrClient = new CloudSolrClient.Builder().withZkHost(connectionString).build();
    cloudSolrClient.setDefaultCollection(collection);
    cloudSolrClient.setZkClientTimeout(30000);
    cloudSolrClient.setZkConnectTimeout(30000);
    solr = cloudSolrClient;
  } else {
    // logInfo(s"creating HttpSolrClient on $solrUrl for collection $collection")
    solr = new HttpSolrClient.Builder(connectionString + "/" + collection).build();
  }
}

代码示例来源:origin: com.hurence.logisland/logisland-outlier-detection-plugin

outlierConfig.getConfig().put(
    SketchyMovingMAD.SMOOTH,
    context.getPropertyValue(SMOOTH).asBoolean());
outlierConfig.getConfig().put(
    RPCAOutlierAlgorithm.FORCE_DIFF_CONFIG,
    context.getPropertyValue(RPCA_FORCE_DIFF).asBoolean());

相关文章