org.apache.commons.lang.mutable.MutableBoolean.setValue()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(102)

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

MutableBoolean.setValue介绍

[英]Sets the value from any Boolean instance.
[中]设置任何布尔实例的值。

代码示例

代码示例来源:origin: commons-lang/commons-lang

/**
 * Sets the value from any Boolean instance.
 * 
 * @param value  the value to set, not null
 * @throws NullPointerException if the object is null
 */
public void setValue(Object value) {
  setValue(((Boolean) value).booleanValue());
}

代码示例来源:origin: apache/incubator-pinot

@Override
 protected void updateTimeBoundary(String tableName, ExternalView externalView) {
  if (tableName.equals("myTable_OFFLINE")) {
   timeBoundaryUpdated.setValue(true);
  }
 }
};

代码示例来源:origin: voldemort/voldemort

/**
 * Remove all non replica clock entries from the list of versioned values
 * provided
 * 
 * @param vals list of versioned values to prune replicas from
 * @param keyReplicas list of current replicas for the given key
 * @param didPrune flag to mark if we did actually prune something
 * @return pruned list
 */
public static List<Versioned<byte[]>> pruneNonReplicaEntries(List<Versioned<byte[]>> vals,
                               List<Integer> keyReplicas,
                               MutableBoolean didPrune) {
  List<Versioned<byte[]>> prunedVals = new ArrayList<Versioned<byte[]>>(vals.size());
  for(Versioned<byte[]> val: vals) {
    VectorClock clock = (VectorClock) val.getVersion();
    List<ClockEntry> clockEntries = new ArrayList<ClockEntry>();
    for(ClockEntry clockEntry: clock.getEntries()) {
      if(keyReplicas.contains((int) clockEntry.getNodeId())) {
        clockEntries.add(clockEntry);
      } else {
        didPrune.setValue(true);
      }
    }
    prunedVals.add(new Versioned<byte[]>(val.getValue(),
                       new VectorClock(clockEntries, clock.getTimestamp())));
  }
  return prunedVals;
}

代码示例来源:origin: apache/incubator-druid

() -> {
 if (firstAttempt.isTrue()) {
  firstAttempt.setValue(false);
 } else if (lookupConfig.getCoordinatorRetryDelay() > 0) {

代码示例来源:origin: apache/drill

if (func.getText().equals("grouping")) {
 ASTNode c = (ASTNode) ParseDriver.adaptor.getChild(root, 1);
 visited.setValue(true);
 for (int i = 0; i < grpByAstExprs.size(); i++) {
  ASTNode grpByExpr = grpByAstExprs.get(i);
   root.setChild(1, child1);
   root.addChild(child2);
   found.setValue(true);
   break;

代码示例来源:origin: naver/ngrinder

@Override
  public void inform(FileDistributionListener listener) {
    safeDist.setValue(listener.start(file, safe));
  }
});

代码示例来源:origin: hector-client/hector

@Override
 public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
  wasRemoved.setValue(true);
  return null;
 }
}).when(listener).onHostDown(host);

代码示例来源:origin: naver/ngrinder

@Override
  public void readyToStop(StopReason stopReason) {
    // Notice: it couldn't distinguish between a script error or
    // timed out of the keepalive connection.
    System.out.println("The stop signal is recieved " + stopReason);
    if (stopReason.getDisplay().equals("Script error")) {
      timeouted.setValue(true);
    }
  }
});

代码示例来源:origin: PhoenicisOrg/phoenicis

/**
 * Stops the watcher
 */
public void stop() {
  running.setValue(false);
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.lang

/**
 * Sets the value from any Boolean instance.
 * 
 * @param value  the value to set, not null
 * @throws NullPointerException if the object is null
 */
public void setValue(Object value) {
  setValue(((Boolean) value).booleanValue());
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Sets the value from any Boolean instance.
 * 
 * @param value  the value to set, not null
 * @throws NullPointerException if the object is null
 */
public void setValue(Object value) {
  setValue(((Boolean) value).booleanValue());
}

代码示例来源:origin: org.apache.directory.api/api-ldap-client-all

/**
 * Sets the value from any Boolean instance.
 * 
 * @param value  the value to set, not null
 * @throws NullPointerException if the object is null
 */
public void setValue(Object value) {
  setValue(((Boolean) value).booleanValue());
}

代码示例来源:origin: com.atlassian.jira/jira-tests

@Override
  public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException
  {
    if (method.getAnnotation(EventListener.class) != null)
    {
      Class<?>[] types = method.getParameterTypes();
      if (types.length == 1 && types[0] == eventClass)
      {
        handlesNotification.setValue(true);
      }
    }
  }
});

代码示例来源:origin: PhoenicisOrg/phoenicis

@PreDestroy
  @Override
  public void close() {
    stop();
    executorService.shutdownNow();
    running.setValue(false);
  }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs

@Override
 public ShortCircuitReplicaInfo createShortCircuitReplicaInfo() {
  calledCreate.setValue(true);
  return null;
 }
});

代码示例来源:origin: com.atlassian.jira.plugins/jira-fisheye-plugin

public void handle(Response response) throws ResponseException
  {
    if (log.isTraceEnabled())
    {
      log.trace("Server response is: {}", response.getResponseBodyAsString());
    }
    requestReturned404.setValue(response.getStatusCode() == 404);
  }
});

代码示例来源:origin: org.apache.bookkeeper/bookkeeper-server

@Override
  public void process(long candidateLedgerId, long startPos, ByteBuf entry) {
    long entrysLedgerId = entry.getLong(entry.readerIndex());
    long entrysEntryId = entry.getLong(entry.readerIndex() + 8);
    if ((candidateLedgerId == entrysLedgerId) && (candidateLedgerId == ledgerId)
        && ((entrysEntryId == entryId) || (entryId == -1))) {
      entryFound.setValue(true);
      formatEntry(startPos, entry, printMsg);
    }
  }
});

代码示例来源:origin: com.atlassian.jira.plugins/jira-fisheye-plugin

public void handle(Response response) throws ResponseException
  {
    if (log.isTraceEnabled())
    {
      log.trace("Server response is: {}", response.getResponseBodyAsString());
    }
    requestReturned404.setValue(response.getStatusCode() == 404);
  }
});

代码示例来源:origin: org.gatein.shindig/shindig-gadgets

public boolean visit(String tag, Element element) throws SpecParserException {
 if (!"OAuth".equals(tag)) return false;
 if (oauthSpec != null) {
  throw new SpecParserException("ModulePrefs/OAuth may only occur once.");
 }
 oauthSpec = new OAuthSpec(element, base);
 oauthMarker.setValue(true);
 return true;
}

代码示例来源:origin: com.lmco.shindig/shindig-gadgets

public boolean visit(String tag, Element element) throws SpecParserException {
 if (!"OAuth".equals(tag)) return false;
 if (oauthSpec != null) {
  throw new SpecParserException("ModulePrefs/OAuth may only occur once.");
 }
 oauthSpec = new OAuthSpec(element, base);
 oauthMarker.setValue(true);
 return true;
}

相关文章