Package org.apache.directory.mavibot.btree.serializer

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


    private BTree<Integer, String> createMultiLevelBTreeLeavesHalfFull() throws IOException
    {
        // Create a BTree with pages containing 4 elements
        int pageSize = 4;

        BTree<Integer, String> btree = new BTree<Integer, String>( "test", new IntSerializer(), new StringSerializer(),
            pageSize );

        Node<Integer, String> root = new Node<Integer, String>( btree, 1L, pageSize );

        // Create the tree with 3 levels, all the leaves containing only N/2 elements
View Full Code Here


        int n = 0;
        int nbElems = 500000;
        long delta = System.currentTimeMillis();

        // Create a BTree with 5 million entries
        BTree<Long, String> btree = new BTree<Long, String>( "test", new LongSerializer(), new StringSerializer() );
        btree.setPageSize( 32 );

        for ( int i = 0; i < nbElems; i++ )
        {
            Long key = ( long ) random.nextLong();
View Full Code Here

     */
    @Test
    public void testBrowseForwardBackwardExtremes() throws Exception
    {
        // Create a BTree with pages containing 4 elements
        BTree<Integer, String> btree = new BTree<Integer, String>( "test", new IntSerializer(), new StringSerializer() );
        btree.setPageSize( 4 );

        for ( int i = 8; i < 13; i++ )
        {
            String strValue = "V" + i;
View Full Code Here

     * @throws IOException If the creation failed
     */
    @BeforeClass
    public static void setup() throws IOException
    {
        btree = new BTree<Long, String>( "test", new LongSerializer(), new StringSerializer() );
    }
View Full Code Here


    @Test
    public void testFullPage() throws Exception
    {
        StringSerializer serializer = new StringSerializer();

        BTreeConfiguration<String, String> config = new BTreeConfiguration<String, String>();
        config.setAllowDuplicates( true );
        config.setName( "master" );
        config.setSerializers( serializer, serializer );
View Full Code Here


    @Test
    public void testMoveFirst() throws Exception
    {
        StringSerializer serializer = new StringSerializer();

        BTreeConfiguration<String, String> config = new BTreeConfiguration<String, String>();
        config.setAllowDuplicates( true );
        config.setName( "master" );
        config.setSerializers( serializer, serializer );
View Full Code Here


    @Test(expected = NoSuchElementException.class)
    public void testMoveLast() throws Exception
    {
        StringSerializer serializer = new StringSerializer();

        BTreeConfiguration<String, String> config = new BTreeConfiguration<String, String>();
        config.setAllowDuplicates( true );
        config.setName( "master" );
        config.setSerializers( serializer, serializer );
View Full Code Here


    @Test(expected = NoSuchElementException.class)
    public void testNextPrevKey() throws Exception
    {
        StringSerializer serializer = new StringSerializer();

        BTreeConfiguration<String, String> config = new BTreeConfiguration<String, String>();
        config.setAllowDuplicates( true );
        config.setName( "master" );
        config.setSerializers( serializer, serializer );
View Full Code Here

     * @throws IOException If the creation failed
     */
    @BeforeClass
    public static void setup() throws IOException
    {
        btree = new BTree<Long, String>( "test", new LongSerializer(), new StringSerializer() );
    }
View Full Code Here

    public void testConfigurationBasic() throws IOException, KeyNotFoundException
    {
        BTreeConfiguration<Integer, String> config = new BTreeConfiguration<Integer, String>();
        config.setName( "basic" );
        config.setPageSize( 32 );
        config.setSerializers( new IntSerializer(), new StringSerializer() );

        try
        {
            // Create the BTree
            BTree<Integer, String> btree = new BTree<Integer, String>( config );
View Full Code Here

TOP

Related Classes of org.apache.directory.mavibot.btree.serializer.StringSerializer

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.