Package com.sun.sgs.impl.service.data.store.cache.queue

Examples of com.sun.sgs.impl.service.data.store.cache.queue.RequestQueueClient$Connection


             QUEUE_SIZE);
    }

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorIllegalRetryWait() {
  new RequestQueueClient(1, socketFactory, failureReporter, MAX_RETRY, 0,
             QUEUE_SIZE);
    }
View Full Code Here


             QUEUE_SIZE);
    }

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorQueueSizeTooSmall() {
  new RequestQueueClient(1, socketFactory, failureReporter, MAX_RETRY,
             RETRY_WAIT, 0);
    }
View Full Code Here

             RETRY_WAIT, 0);
    }

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorQueueSizeTooBig() {
  new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      RequestQueueServer.MAX_OUTSTANDING + 1);
    }
View Full Code Here

    @Test
    public void testConnectionServerSocketClosed() throws Exception {
  listener.shutdown();
  NoteFailure failureReporter = new NoteFailure();
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  failureReporter.checkCalled(MAX_RETRY);
    }
View Full Code Here

    }

    @Test
    public void testConnectionServerUnknown() throws Exception {
  NoteFailure failureReporter = new NoteFailure();
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  failureReporter.checkCalled(MAX_RETRY);
    }
View Full Code Here

    /* Test addRequest */

    @Test
    public void testAddRequestNullRequest() {
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  try {
      client.addRequest(null);
      fail("Expected NullPointerException");
View Full Code Here

  }
    }

    @Test
    public void testAddRequestShutdown() {
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  client.shutdown();
  try {
      client.addRequest(new DummyRequest());
View Full Code Here

    public void testAddRequestSuccess() throws Exception {
  serverDispatcher.setServer(
      1,
      new RequestQueueServer<SimpleRequest>(
    1, new SimpleRequestHandler()));
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  SimpleRequest request = new SimpleRequest(1);
  client.addRequest(request);
  request.awaitCompleted(extraWait);
View Full Code Here

  serverDispatcher.setServer(
      1,
      new RequestQueueServer<SimpleRequest>(
    1, new SimpleRequestHandler()));
  NoteFailure failureReporter = new NoteFailure();
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  client.shutdown();
  client.shutdown();
  failureReporter.checkNotCalled();
View Full Code Here

  serverDispatcher.setServer(
      1,
      new RequestQueueServer<SimpleRequest>(
    1, new SimpleRequestHandler()));
  NoteFailure failureReporter = new NoteFailure();
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  SimpleRequest request = new SimpleRequest(1);
  client.addRequest(request);
  request.awaitCompleted(extraWait);
View Full Code Here

TOP

Related Classes of com.sun.sgs.impl.service.data.store.cache.queue.RequestQueueClient$Connection

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.