Examples of OperationTimeoutException


Examples of net.spy.memcached.OperationTimeoutException

        };

        // get empty old entry
        EasyMock.expect(mockKeyHashingScheme.hash(url)).andReturn(key).anyTimes();
        EasyMock.expect(mockMemcachedClient.gets(key))
            .andThrow(new OperationTimeoutException(""));

        replayMocks();
        try {
            impl.updateEntry(url, callback);
            fail("should have thrown exception");
View Full Code Here

Examples of net.spy.memcached.OperationTimeoutException

    } catch (InterruptedException e) {
      throw new RuntimeException("Interrupted waiting for value", e);
    } catch (ExecutionException e) {
      throw new RuntimeException("Exception waiting for value", e);
    } catch (TimeoutException e) {
      throw new OperationTimeoutException("Timeout waiting for value", e);
    }
  }
View Full Code Here

Examples of net.spy.memcached.OperationTimeoutException

        throw (CancellationException) e.getCause();
      } else {
        throw new RuntimeException("Exception waiting for value", e);
      }
    } catch (TimeoutException e) {
      throw new OperationTimeoutException("Timeout waiting for value", e);
    }
  }
View Full Code Here

Examples of net.spy.memcached.OperationTimeoutException

        throw (CancellationException) e.getCause();
      } else {
        throw new RuntimeException("Exception waiting for value", e);
      }
    } catch (TimeoutException e) {
      throw new OperationTimeoutException("Timeout waiting for value", e);
    }

  }
View Full Code Here

Examples of net.spy.memcached.OperationTimeoutException

        assertNull(createFor( "n1:localhost:11211", null, null, _mcc ).getNextAvailableNodeId("n1"));
        assertEquals(createFor( "n1:localhost:11211,n2:localhost:11212", null, null, _mcc ).getNextAvailableNodeId("n1"), "n2");

        final MemcachedClientCallback mcc = mock(MemcachedClientCallback.class);
        when(mcc.get(anyString())).thenReturn(null);
        when(mcc.get(endsWith("n2"))).thenThrow(new OperationTimeoutException("SimulatedException"));
        assertNull(createFor( "n1:localhost:11211,n2:localhost:11212", null, null, mcc).getNextAvailableNodeId("n1"));

        assertEquals(createFor( "n1:localhost:11211,n2:localhost:11212,n3:localhost:11213", null, null, mcc).getNextAvailableNodeId("n1"), "n3");
    }
View Full Code Here

Examples of net.spy.memcached.OperationTimeoutException

    } catch (InterruptedException e) {
      throw new RuntimeException("Interrupted waiting for value", e);
    } catch (ExecutionException e) {
      throw new RuntimeException("Exception waiting for value", e);
    } catch (TimeoutException e) {
      throw new OperationTimeoutException("Timeout waiting for value", e);
    }
  }
View Full Code Here

Examples of net.spy.memcached.OperationTimeoutException

    } catch (InterruptedException e) {
      throw new RuntimeException("Interrupted waiting for value", e);
    } catch (ExecutionException e) {
      throw new RuntimeException("Exception waiting for value", e);
    } catch (TimeoutException e) {
      throw new OperationTimeoutException("Timeout waiting for value", e);
    }
  }
View Full Code Here

Examples of net.spy.memcached.OperationTimeoutException

        throw (CancellationException) e.getCause();
      } else {
        throw new RuntimeException("Exception waiting for value", e);
      }
    } catch (TimeoutException e) {
      throw new OperationTimeoutException("Timeout waiting for value", e);
    }
  }
View Full Code Here

Examples of net.spy.memcached.OperationTimeoutException

        throw (CancellationException) e.getCause();
      } else {
        throw new RuntimeException("Exception waiting for value", e);
      }
    } catch (TimeoutException e) {
      throw new OperationTimeoutException("Timeout waiting for value", e);
    }

  }
View Full Code Here

Examples of net.spy.memcached.OperationTimeoutException

        throw (CancellationException) e.getCause();
      } else {
        throw new RuntimeException("Exception waiting for value", e);
      }
    } catch (TimeoutException e) {
      throw new OperationTimeoutException("Timeout waiting for value: ", e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.