Code Monkey home page Code Monkey logo

jb-tree's Introduction

Description

This Project provides two cool things:

  • A flexible way of creating and handling pages on different resources (like the file system)
  • An implementation of a B+-Tree that can
    • be ordered arbitrarily by providing a comparator
    • serializers can be handed in as dependency
    • the resource manager to which the B-Tree is persisted is handed in as interface.

Dev Requirements

  • gradle >= 1.0-milestone-6 (install on mac with homebrew: brew install gradle --HEAD)

Getting started

This Repository

get started by cloning the repository:

git clone git://github.com/rweng/multimap.git
cd index
# look at all tasks you can do with the build manager
gradle tasks
# if you are in eclipse, generate the eclipse files to be able to open the repository as eclipse project
gradle eclipse
# run the tests
gradle test
# generate javadoc
gradle javadoc
open build/doc/javadoc/index.html

Creating a ResourceManager

// creates a cached resource manager. All values are the default values and can be ommited (except file())
new ResourceManagerBuilder().file("/tmp/test").useLock(true).useCache(true).cacheSize(100)
    .pageSize(PageSize.DEFAULT_PAGE_SIZE).build();

// creates a plain FileResourceManager without Caching
new ResourceManagerBuilder().file("/tmp/test").useCache(false).build();

Creating a BTree Instance

@Test
public void staticMethodConstructor() throws IOException {
	final BTree<Integer, String> btree =
			BTree.create(createResourceManager(true), IntegerSerializer.INSTANCE, FixedStringSerializer.INSTANCE,
					IntegerComparator.INSTANCE);
	btree.initialize();
}

private AutoSaveResourceManager createResourceManager(final boolean reset) {
	if (reset)
		file.delete();
	return new ResourceManagerBuilder().file(file).buildAutoSave();
}

Documentation

You can find the Javadoc here - If you click on Network, you can see a branch called gh-pages on which you can see the commit the Javadocs are about (not always completely up-to-date).

jb-tree's People

Contributors

rweng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jb-tree's Issues

AOP

think about moving methods like ensureValid() for classes implementing MustBeInitializedOrLoaded into an interceptor. However, if we do this we have to make sure that the class can only be created through guice!

Licence Questions

Hi,

I'm interested of using jb-tree for a non-commercial personal project. I'm interested to know what licence you've published it under? Is it free for modification, redistribution, and/or commercial use?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.