Package com.google.enterprise.connector.instantiator

Examples of com.google.enterprise.connector.instantiator.ThreadPool$LazyThreadPool


        PusherFactory pusherFactory =
            new DocPusherFactory(new MockFileFeedConnection(out));

        MockInstantiator instantiator =
            new MockInstantiator(new ThreadPool(300, new SystemClock()));

        Traverser traverser = new QueryTraverser(pusherFactory, qtm,
            instantiator.getTraversalStateStore(connectorName),
            connectorName, null, new SystemClock());
View Full Code Here


  public void testTraversal() throws InterruptedException, RepositoryException {
    final String connectorName = "sharepoint";
    final Session session = this.connector.login();
    GlobalState.forgetState(null);
    final SharepointTraversalManager traversalManager = (SharepointTraversalManager) session.getTraversalManager();
    final MockInstantiator instantiator = new MockInstantiator(new ThreadPool(
        5, new SystemClock()));
    final Traverser traverser = new QueryTraverser(new MockPusher(System.out),
        traversalManager, instantiator.getTraversalStateStore(connectorName),
        connectorName, Context.getInstance().getTraversalContext(),
        new SystemClock());
View Full Code Here

      }
    }
  }

  private Instantiator createMockInstantiator() {
    ThreadPool threadPool = new ThreadPool(5,
        new SystemClock() /* TODO: use mock clock? */);
    MockInstantiator instantiator = new MockInstantiator(threadPool);
    instantiator.setupTestTraversers();
    return instantiator;
  }
View Full Code Here

  @Override
  protected void setUp() throws Exception {
    connectorName = getName();
    clock = new AdjustableClock();
    threadPool = new ThreadPool(5, clock);
    instantiator = new MockInstantiator(threadPool);
    pusher = new ValidatingPusher();
    traversalContext = new ProductionTraversalContext();
    traversalContext.setTraversalTimeLimitSeconds(1);
    stateStore = new RecordingTraversalStateStore();
View Full Code Here

  private String connectorName = MockInstantiator.TRAVERSER_NAME1;
  private String docid = "docid";

  private MockInstantiator getMockInstantiator() throws Exception {
    MockInstantiator instantiator =
        new MockInstantiator(new ThreadPool(5, new SystemClock()));
    instantiator.setupTestTraversers();
    instantiator.addConnector(connectorName,
        new MockConnector(null, null, null, new MockRetriever(), null));
    return instantiator;
  }
View Full Code Here

  MockInstantiator instantiator;
  AuthenticationIdentity identity;
  String connectorName;

  protected void setUp() throws Exception {
    ThreadPool threadPool = new ThreadPool(5, new SystemClock());
    instantiator = new MockInstantiator(threadPool);
    instantiator.setupTestTraversers();
    manager = new ProductionManager();
    manager.setInstantiator(instantiator);
    manager.setFeedConnection(new MockFeedConnection());
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.instantiator.ThreadPool$LazyThreadPool

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.