Examples of IntSerializer


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


    @Test
    public void testBrowseEmptyTree() throws IOException, KeyNotFoundException, BTreeAlreadyManagedException
    {
        IntSerializer serializer = IntSerializer.INSTANCE;

        BTree<Integer, Integer> btree = BTreeFactory.createPersistedBTree( "master", serializer, serializer );
       
        // Inject the newly created BTree into teh recordManager
        recordManager1.manage( btree );
View Full Code Here

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


    @Test
    public void testNextAfterPrev() throws Exception
    {
        IntSerializer serializer = IntSerializer.INSTANCE;

        InMemoryBTreeConfiguration<Integer, Integer> config = new InMemoryBTreeConfiguration<Integer, Integer>();
        config.setName( "master" );
        config.setPageSize( 4 );
        config.setSerializers( serializer, serializer );
View Full Code Here

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


    @Test
    public void testCheckRootPageContents() throws Exception
    {
        IntSerializer ser = IntSerializer.INSTANCE;
        BTree<Integer, Integer> btree = BTreeFactory.createInMemoryBTree( "master1", ser, ser, 4 );

        for ( int i = 1; i < 8; i++ )
        {
            btree.insert( i, i );
View Full Code Here

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

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

        // Inject the values
        for ( int value : sortedValues )
View Full Code Here

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

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

        // Inject the values
        for ( int value : sortedValues )
View Full Code Here

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

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

        TupleCursor<Integer, String> cursor = btree.browse();

View Full Code Here

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

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

        for ( int i = 0; i < 16; i++ )
        {
View Full Code Here

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

     */
    @Test
    public void testBrowseNonExistingKey() throws Exception
    {
        // Create a BTree with pages containing 8 elements
        BTree<Integer, String> btree = BTreeFactory.createInMemoryBTree( "test", new IntSerializer(),
            new StringSerializer() );
        btree.setPageSize( 8 );
        for ( int i = 0; i < 11; i++ )
        {
            btree.insert( i, String.valueOf( i ) );
View Full Code Here

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

    /**
     * Creates a 2 level depth tree of full pages
     */
    private BTree<Integer, String> createTwoLevelBTreeFullLeaves() throws IOException
    {
        BTree<Integer, String> btree = BTreeFactory.createInMemoryBTree( "test", new IntSerializer(),
            new StringSerializer() );
        btree.setPageSize( 4 );

        // Create a tree with 5 children containing 4 elements each. The tree is full.
        int[] keys = new int[]
View Full Code Here

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

    /**
     * Creates a 2 level depth tree of half full pages
     */
    private BTree<Integer, String> createTwoLevelBTreeHalfFullLeaves() throws IOException
    {
        BTree<Integer, String> btree = BTreeFactory.createInMemoryBTree( "test", new IntSerializer(),
            new StringSerializer() );
        btree.setPageSize( 4 );

        // Create a tree with 5 children containing 4 elements each. The tree is full.
        int[] keys = new int[]
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.