Package javax.datagrid

Examples of javax.datagrid.DataGrid.take()


    DataGrid dataGrid = new TransientDataGrid();
    String result = dataGrid.write("key", "value");
    assertEquals(result, "value");
    result = dataGrid.read("key");
    assertEquals(result, "value");
    result = dataGrid.take("key");
    assertEquals(result, "value");
    result = dataGrid.read("key");
    assertNull(result);
    result = dataGrid.read("newKey");
    assertNull(result);
View Full Code Here


    result = dataGrid.write("key", "value", 100);
    assertEquals(result, "value");
    result = dataGrid.read("key");
    assertEquals(result, "value");
    sleep(110);
    result = dataGrid.take("key");
    assertNull(result);
  }

  @Test(expectedExceptions = ClassCastException.class)
  public void testCastingProblems() {
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.