Friday, 15 January 2010

java embedded key-value data store for counters -



java embedded key-value data store for counters -

i searching embedded key-value info store which

has java api easy manipulate counters (a.k.a. set value=value+10 key="k") support multi-threads clients high performance

i have found leveldbjni, designed simple k-v operation , unfriendly counters. there improve solutions?

thanks.

with java library can utilize map atomicinteger value.

in next examples utilize string datatype key.

e.g.

map<string, atomicinteger> kvstore = new ...

to manipulate counters can use

kvstore.get("...").addandget(10);

to retrieve updated value

atomicinteger value = kvstore.get("...").addandget(10);

as atomicinteger designed concurrency multi-threaded environmet should no problem.

i cannot tell how performance of don't know specific requirements have determine yourself.

java embedded-database key-value-store

No comments:

Post a Comment