Package com.opengamma.engine.function.blacklist

Examples of com.opengamma.engine.function.blacklist.ManageableFunctionBlacklist


    @Override
    public FunctionBlacklistMaintainer getUpdate(final String hostId) {
      if (getBlacklistPolicy().isEmpty()) {
        return null;
      }
      final ManageableFunctionBlacklist blacklist = getBlacklistProvider().getBlacklist(getBlacklistPrefix() + hostId);
      if (blacklist == null) {
        return null;
      }
      return new DefaultFunctionBlacklistMaintainer(getBlacklistPolicy(), blacklist);
    }
View Full Code Here


  public void testFunctionBlacklistMaintainerProviderBean_livePolicy() {
    final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
    try {
      final FunctionBlacklistMaintainerProviderBean bean = new FunctionBlacklistMaintainerProviderBean();
      final ManageableFunctionBlacklistProvider provider = Mockito.mock(ManageableFunctionBlacklistProvider.class);
      final ManageableFunctionBlacklist blacklist = Mockito.mock(ManageableFunctionBlacklist.class);
      Mockito.when(provider.getBlacklist("BL_Foo")).thenReturn(blacklist);
      bean.setBlacklistProvider(provider);
      bean.setBlacklistPrefix("BL_");
      bean.setBlacklistPolicy(new DefaultFunctionBlacklistPolicy(UniqueId.of("Test", "Foo"), 60, Arrays.asList(FunctionBlacklistPolicy.Entry.WILDCARD)));
      final FunctionBlacklistMaintainer maintainer = bean.getUpdate("Foo");
View Full Code Here

TOP

Related Classes of com.opengamma.engine.function.blacklist.ManageableFunctionBlacklist

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.