public class MongoDBVCounter extends java.lang.Object implements VCounter
VCounter
for MongoDB. Uses a high-low strategy to
obtain a pool of free IDs on each call to updateNextId()
.Constructor and Description |
---|
MongoDBVCounter(com.mongodb.DB db)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
long |
getNextId()
A thread safe method to get the next unique id
|