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

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

@see RequestQueueListener @see RequestQueueServer

  }
    }

    @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

  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);
  final SimpleRequest firstRequest = new SimpleRequest(1);
  clientThread = new InterruptableThread() {
      private int next = 1;
View Full Code Here

      new LinkedBlockingDeque<SimpleRequest>();
  serverDispatcher.setServer(
      1,
      new RequestQueueServer<SimpleRequest>(
    1, new SimpleRequestHandler()));
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  clientThread = new InterruptableThread() {
      private int count = 0;
      boolean runOnce() throws Exception {
View Full Code Here

  serverDispatcher.setServer(
      1,
      new RequestQueueServer<SimpleRequest>(
    1,
    new FailingRequestHandler(new Random(seed), total - 50)));
  client = new RequestQueueClient(
      1, new FailingSocketFactory(new Random(seed + 1)),
      failureReporter, MAX_RETRY, RETRY_WAIT, QUEUE_SIZE);
  final AtomicBoolean clientDone = new AtomicBoolean(false);
  clientThread = new InterruptableThread() {
      private int count = 0;
View Full Code Here

          }
      }
        }
    }));
  NoteFailure failureReporter = new NoteFailure();
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  client.addRequest(new SimpleRequest(1));
  failureReporter.checkCalled(2 * MAX_RETRY);
    }
View Full Code Here

        {
      throw new Exception("Test");
        }
    }));
  NoteFailure failureReporter = new NoteFailure();
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  client.addRequest(new SimpleRequest(1));
  failureReporter.checkCalled(0);
  Throwable exception = failureReporter.getException();
View Full Code Here

        {
      throw new AssertionError("Test");
        }
    }));
  NoteFailure failureReporter = new NoteFailure();
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  client.addRequest(new SimpleRequest(1));
  failureReporter.checkCalled(0);
  Throwable exception = failureReporter.getException();
View Full Code Here

TOP

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

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.