Package com.opengamma.engine.function.blacklist

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


  @PropertyDefinition
  private ScheduledExecutorService _executor = Executors.newSingleThreadScheduledExecutor();

  @Override
  public void init(final ComponentRepository repo, final LinkedHashMap<String, String> configuration) {
    final ManageableFunctionBlacklistProvider provider = new InMemoryFunctionBlacklistProvider(getExecutor());
    final ComponentInfo infoRO = new ComponentInfo(FunctionBlacklistProvider.class, getClassifier());
    infoRO.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    infoRO.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteFunctionBlacklistProvider.class);
    repo.registerComponent(infoRO, provider);
   
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");
      maintainer.failedJobItem(JOB_ITEM);
View Full Code Here

TOP

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

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.