本文整理匯總了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;
}
}