本文整理汇总了Java中com.google.common.collect.Multimaps.filterKeys方法的典型用法代码示例。如果您正苦于以下问题:Java Multimaps.filterKeys方法的具体用法?Java Multimaps.filterKeys怎么用?Java Multimaps.filterKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.collect.Multimaps
的用法示例。
在下文中一共展示了Multimaps.filterKeys方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: copyFiltered
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
public EventArgScoringAlignment<EquivClassType> copyFiltered(
final Predicate<EquivClassType> filter) {
return new EventArgScoringAlignment<EquivClassType>(docID(), argumentOutput, answerKey,
Iterables.filter(truePositiveECs, filter),
Iterables.filter(falsePositiveECs, filter),
Iterables.filter(falseNegativeECs, filter),
Iterables.filter(unassessed, filter),
Multimaps.filterKeys(ecsToAnswerKey, filter),
Multimaps.filterKeys(ecsToSystem, filter));
}
示例2: awaitHealthy
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
throw new TimeoutException(
"Timeout waiting for the services to become healthy. The "
+ "following services have not started: "
+ Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
}
checkHealthy();
} finally {
monitor.leave();
}
}
示例3: awaitStopped
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
throw new TimeoutException(
"Timeout waiting for the services to stop. The following "
+ "services have not stopped: "
+ Multimaps.filterKeys(servicesByState, not(in(EnumSet.of(TERMINATED, FAILED)))));
}
} finally {
monitor.leave();
}
}
示例4: checkHealthy
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
@GuardedBy("monitor")
void checkHealthy() {
if (states.count(RUNNING) != numberOfServices) {
IllegalStateException exception =
new IllegalStateException(
"Expected to be healthy after starting. The following services are not running: "
+ Multimaps.filterKeys(servicesByState, not(equalTo(RUNNING))));
throw exception;
}
}
示例5: awaitHealthy
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
throw new TimeoutException(
"Timeout waiting for the services to become healthy. The "
+ "following services have not started: " + Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
}
checkHealthy();
} finally {
monitor.leave();
}
}
示例6: awaitStopped
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
throw new TimeoutException(
"Timeout waiting for the services to stop. The following "
+ "services have not stopped: " + Multimaps.filterKeys(servicesByState, not(in(EnumSet.of(TERMINATED, FAILED)))));
}
} finally {
monitor.leave();
}
}
示例7: checkHealthy
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
@GuardedBy("monitor")
void checkHealthy() {
if (states.count(RUNNING) != numberOfServices) {
IllegalStateException exception = new IllegalStateException("Expected to be healthy after starting. The following services are not running: " + Multimaps.filterKeys(servicesByState, not(equalTo(RUNNING))));
throw exception;
}
}
示例8: awaitHealthy
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
throw new TimeoutException("Timeout waiting for the services to become healthy. The "
+ "following services have not started: " + Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
}
checkHealthy();
} finally {
monitor.leave();
}
}
示例9: awaitStopped
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
throw new TimeoutException("Timeout waiting for the services to stop. The following "
+ "services have not stopped: " + Multimaps.filterKeys(servicesByState, not(in(EnumSet.of(TERMINATED, FAILED)))));
}
} finally {
monitor.leave();
}
}
示例10: awaitHealthy
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
throw new TimeoutException(
"Timeout waiting for the services to become healthy. The "
+ "following services have not started: " + Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
}
checkHealthy();
} finally {
monitor.leave();
}
}
示例11: awaitStopped
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
throw new TimeoutException(
"Timeout waiting for the services to stop. The following "
+ "services have not stopped: " + Multimaps.filterKeys(servicesByState, not(in(EnumSet.of(TERMINATED, FAILED)))));
}
} finally {
monitor.leave();
}
}
示例12: determineDuplicatedTrades
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
private Multimap<String, String> determineDuplicatedTrades() {
return Multimaps.filterKeys(_invertedPositions,
new Predicate<String>() {
@Override
public boolean apply(String s) {
return _invertedPositions.get(s).size() > 1;
}
}
);
}
示例13: awaitHealthy
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
throw new TimeoutException("Timeout waiting for the services to become healthy. The "
+ "following services have not started: "
+ Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
}
checkHealthy();
} finally {
monitor.leave();
}
}
示例14: awaitStopped
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
monitor.enter();
try {
if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
throw new TimeoutException("Timeout waiting for the services to stop. The following "
+ "services have not stopped: "
+ Multimaps.filterKeys(servicesByState,
not(in(EnumSet.of(TERMINATED, FAILED)))));
}
} finally {
monitor.leave();
}
}
示例15: checkHealthy
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
@GuardedBy("monitor")
void checkHealthy() {
if (states.count(RUNNING) != numberOfServices) {
IllegalStateException exception = new IllegalStateException(
"Expected to be healthy after starting. The following services are not running: "
+ Multimaps.filterKeys(servicesByState, not(equalTo(RUNNING))));
throw exception;
}
}