All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.edgar615.util.spring.jdbc.JdbcTicket Maven / Gradle / Ivy

package com.github.edgar615.util.spring.jdbc;

import java.util.concurrent.ExecutorService;
import javax.sql.DataSource;

/**
 * Created by Edgar on 2018/5/18.
 *
 * @author Edgar  Date 2018/5/18
 */
public interface JdbcTicket {

  /**
   * 获取一个ticket
   *
   * @return
   */
  long ticket();

  static JdbcTicket create(String ticketTable, String stub, int maxSize, DataSource dataSource,
                           ExecutorService executorService) {
    return new JdbcTicketImpl(ticketTable, stub, maxSize, dataSource, executorService);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy