dcoll

Distributed collections for JDG

License

License

GroupId

GroupId

org.mk300
ArtifactId

ArtifactId

dcoll
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

dcoll
Distributed collections for JDG
Project URL

Project URL

http://mk300.org
Source Code Management

Source Code Management

https://github.com/mkobayas/dcoll

Download dcoll

How to add to project

<!-- https://jarcasting.com/artifacts/org.mk300/dcoll/ -->
<dependency>
    <groupId>org.mk300</groupId>
    <artifactId>dcoll</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.mk300/dcoll/
implementation 'org.mk300:dcoll:1.0.0'
// https://jarcasting.com/artifacts/org.mk300/dcoll/
implementation ("org.mk300:dcoll:1.0.0")
'org.mk300:dcoll:jar:1.0.0'
<dependency org="org.mk300" name="dcoll" rev="1.0.0">
  <artifact name="dcoll" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.mk300', module='dcoll', version='1.0.0')
)
libraryDependencies += "org.mk300" % "dcoll" % "1.0.0"
[org.mk300/dcoll "1.0.0"]

Dependencies

provided (1)

Group / Artifact Type Version
org.infinispan : infinispan-core jar 6.2.0.Final-redhat-4

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
com.thoughtworks.xstream : xstream jar 1.2.2

Project Modules

There are no modules declared in this project.

dcoll

Distributed collections for JDG

  • DistributedOneToMany
  • TODO DistributedSearchableList

DistributedOneToMany

Distributed OneToMany is useful for managing huge size one to many relational data on JDG.
It divide many data into distributed bucket.
This structure is suitable for Distributed Execution.

class MyOneToMany extends DistributedOneToMany<String, String, String> { // Define your definition.
    public MyOneToMany(Cache cache) { super(cache); }
    public int getMaxBucketSize() { return 500; }
    public int getMinCompactionBucketSize() { return 100; }
    public long getTransferExpireMills() { return 30000; }
}

DefaultCacheManager manager = new ----

AdvancedCache cache = manager.getCache("myDistCache").getAdvancedCache();
MyOneToMany tb = new MyOneToMany(cache);  

cache.lock("FirstKey1");
tb.put("FirstKey1", "SecondKey1-1", "data1-1");
tb.put("FirstKey1", "SecondKey1-2", "data1-2");
tb.put("FirstKey1", "SecondKey1-3", "data1-3");
tb.put("FirstKey1", "SecondKey1-4", "data1-4");
tb.put("FirstKey1", "SecondKey1-5", "data1-5");

cache.lock("FirstKey2");
tb.put("FirstKey2", "SecondKey2-1", "data2-1");
tb.put("FirstKey2", "SecondKey2-2", "data2-2");
tb.put("FirstKey2", "SecondKey2-3", "data2-3");
tb.put("FirstKey2", "SecondKey2-4", "data2-4");
tb.put("FirstKey2", "SecondKey2-5", "data2-5");

FirstKey1 -+- SecondKey1-1 -- data1-1
           +- SecondKey1-2 -- data1-2
           +- SecondKey1-3 -- data1-3
           +- SecondKey1-4 -- data1-4
           +- SecondKey1-5 -- data1-5


FirstKey2 -+- SecondKey2-1 -- data2-1
           +- SecondKey2-2 -- data2-2
           +- SecondKey2-3 -- data2-3
           +- SecondKey2-4 -- data2-4
           +- SecondKey2-5 -- data2-5

Versions

Version
1.0.0