Package net.openhft.collections

Examples of net.openhft.collections.SharedHashMapBuilder.file()


        //// don't include this, just to check it is as expected.
        assertEquals(8, builder.minSegments());
        //// end of test

        String shmPath = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + "SHMTest5";
        SharedHashMap<String, SHMTest5Data> theSharedMap = builder.file(new File(shmPath)).kClass(String.class).vClass(SHMTest5Data.class).create();

        //Now get the shared data object, auto-creating if it's not there
        SHMTest5Data data = DataValueClasses.newDirectReference(SHMTest5Data.class);
        theSharedMap.acquireUsing(TEST_KEY, data);
        //if this was newly created, we need to set the max allowed
View Full Code Here


    this.sharedMapPath = sharedMapPath;
    this.callback = callback;
    SharedHashMapBuilder builder = new SharedHashMapBuilder();
    builder.entries(1000);
    builder.entrySize(1024);
        this.theSharedMap = builder.file(new File(sharedMapPath)).kClass(String.class).vClass(Data.class).create();
    Thread t = new Thread(this, "ProcessInstanceLimiter updater");
    t.setDaemon(true);
    t.start();
  }
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.