Examples of LongSerializer


Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

        openRecordManagerAndBtree();

        try
        {
            // Create a new BTree which allows duplicate values
            btree = recordManager.addBTree( "test", new LongSerializer(), new StringSerializer(), true );
        }
        catch ( Exception e )
        {
            throw new RuntimeException( e );
        }
View Full Code Here

Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

     * Create a btree
     */
    @Before
    public void setup() throws IOException
    {
        btree = BTreeFactory.createInMemoryBTree( "test", new LongSerializer(), new StringSerializer() );
        btree.setPageSize( 8 );
    }
View Full Code Here

Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

     * @throws IOException If the creation failed
     */
    @BeforeClass
    public static void setup() throws IOException
    {
        btree = BTreeFactory.createInMemoryBTree( "test", new LongSerializer(), new StringSerializer() );
    }
View Full Code Here

Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

        openRecordManagerAndBtree();

        try
        {
            // Create a new BTree
            btree = recordManager1.addBTree( "test", new LongSerializer(), new StringSerializer(),
                BTree.ALLOW_DUPLICATES );
        }
        catch ( Exception e )
        {
            throw new RuntimeException( e );
View Full Code Here

Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

     * Test that a BTree which forbid duplicate values does not accept them
     */
    @Test(expected = DuplicateValueNotAllowedException.class)
    public void testBTreeForbidDups() throws IOException, BTreeAlreadyManagedException
    {
        BTree<Long, String> singleValueBtree = recordManager1.addBTree( "test2", new LongSerializer(),
            new StringSerializer(), BTree.FORBID_DUPLICATES );

        for ( long i = 0; i < 64; i++ )
        {
            singleValueBtree.insert( i, Long.toString( i ) );
View Full Code Here

Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

        openRecordManagerAndBtree();

        try
        {
            // Create a new BTree which allows duplicate values
            btree = recordManager1.addBTree( "test", new LongSerializer(), new StringSerializer(), true );
        }
        catch ( Exception e )
        {
            throw new RuntimeException( e );
        }
View Full Code Here

Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

     * Test that a BTree which forbid duplicate values does not accept them
     */
    @Test(expected = DuplicateValueNotAllowedException.class)
    public void testBTreeForbidDups() throws IOException, BTreeAlreadyManagedException
    {
        BTree<Long, String> singleValueBtree = BTreeFactory.createInMemoryBTree( "test2", new LongSerializer(),
            new StringSerializer(), BTree.FORBID_DUPLICATES );

        for ( long i = 0; i < 64; i++ )
        {
            singleValueBtree.insert( i, Long.toString( i ) );
View Full Code Here

Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

        openRecordManagerAndBtree();

        try
        {
            // Create a new BTree
            btree = recordManager1.addBTree( "test", new LongSerializer(), new StringSerializer(), false );
        }
        catch ( Exception e )
        {
            throw new RuntimeException( e );
        }
View Full Code Here

Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

        openRecordManagerAndBtree();

        try
        {
            // Create a new BTree
            btree = recordManager.addBTree( "test", new LongSerializer(), new StringSerializer(), false );
        }
        catch ( Exception e )
        {
            throw new RuntimeException( e );
        }
View Full Code Here

Examples of org.apache.directory.mavibot.btree.serializer.LongSerializer

        int numKeys = 1;
        String name = "duplicateTree";
        String[] testValues = new String[]
            { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0A", "0B", "0C", "0D", "0E", "0F", "10" };

        BTree<Long, String> dupsTree = BTreeFactory.createPersistedBTree( name, new LongSerializer(),
            new StringSerializer(), pageSize, true );

        recordManager.manage( dupsTree );

        for ( long i = 0; i < numKeys; i++ )
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.