Categorygithub.com/jasonjoo2010/enhanced-utils/concurrent/distlock/database

# README

database store for distributed lock

Table structure

Name of table can be changed and initial instance with WithTable option.

CREATE TABLE `lock` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `key` varchar(100) NOT NULL DEFAULT '',
  `value` varchar(100) NOT NULL DEFAULT '',
  `version` bigint NOT NULL DEFAULT '0',
  `created` bigint NOT NULL DEFAULT '0',
  `expire` bigint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `key` (`key`)
) ENGINE=InnoDB;