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

io.github.icodegarden.nutrient.lang.registry.DatabaseRegistryRepository Maven / Gradle / Ivy

There is a newer version: 3.0.2
Show newest version
package io.github.icodegarden.nutrient.lang.registry;

import java.util.List;

/**
 * 
 * @author Fangfang.Xu
 *
 */
public interface DatabaseRegistryRepository {

	public static final String TABLE_NAME = "registry";

	/**
	 * 查询可能的已注册票据,不包含过期的
	 */
	SimpleRegistrationDO findByRegistration(Registration registration, String nowStr);

	/**
	 * 根据name查询任意可用的票据
	 */
	SimpleRegistrationDO findAnyAvailableByName(String name, String nowStr);

	/**
	 * 根据name查询最后的index
	 */
	SimpleRegistrationDO findMaxIndexByName(String name);

	void createOnRegister(int index, Registration registration, String nowStr);

	void updateOnRegister(ID id, Registration registration, String nowStr);

	void updateOnDeregister(ID id);

	/**
	 * 更新租期(keepalive)
* 不可以用id作为条件 */ int updateLease(Registration registration, String nowStr); /** * 更新注册信息 */ void updateRegistration(ID id, String metadata, String info); /** * 查询可能的已注册票据,不包含过期的 */ List findAllRegistered(String name, boolean withMetadata, boolean withInfo,String nowStr); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy