Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Clusterable implementation of the java collections framework.

License

Notifications You must be signed in to change notification settings

sarnowski/clustered-collections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clustered Collections
=============================================================================

The clustered-collections project aims to provide clusterable implementations
of the java collections framework. It has a small footprint due to a very
few dependencies.

It is not a replacement for caches! It lacks any eviction strategy nor does
it support persistence.


There are similar projects out there, e.g. KeptCollections(1). Target of this
project is to minimize dependencies and support a non-single-point-of-failure
architecture.


  https://github.com/sarnowski/clustered-collections



Maven
=============================================================================

<dependency>
    <groupId>com.github.sarnowski</groupId>
    <artifactId>clustered-collections</artifactId>
    <version>[1.0,2)</version>
</dependency>

<repository>
    <id>sarnowski.github.com</id>
    <url>http://sarnowski.github.com/repository</url>
</repository>


Usage
=============================================================================

import com.github.sarnowski.collections.*;


List<String> words =
        ClusteredCollections.newReplicatedClusteredList("MyClusteredList");

Set<String> words =
        ClusteredCollections.newReplicatedClusteredSet("MyClusteredSet");

Map<String,String> texts =
        ClusteredCollections.newReplicatedClusteredMap("MyClusteredMap");


Demo
=============================================================================

You can start a demo for the collections with the *-demo.jar file.

  $ java -Djgroups.bind_addr=192.168.0.5 \
         -cp clustered-collections-*-demo.jar \
         com.github.sarnowski.collections.demo.ReplicatedClusteredListDemo

Use your local network address.


Configuration
=============================================================================

For more informations about configuring the cluster setup, please have a look
at http://jgroups.org/. This project uses JGroups as it's underlying network
handler.


Compiling
=============================================================================

For compiling the source code by yourself, use Maven and just enter the
following command in the project directory:

  $ mvn install

For building the demo jar, enter the following command:

  $ mvn assembly:assembly

The demo jar will be created in the folder "target".


License
=============================================================================

Copyright (c) 2011 Tobias Sarnowski

See the LICENSE file.



Footnotes
=============================================================================

1) https://github.com/anthonyu/KeptCollections

About

Clusterable implementation of the java collections framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages