org.nervousync.generator.IGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils-jdk11 Show documentation
Show all versions of utils-jdk11 Show documentation
Java utility collections, development by Nervousync Studio (NSYC)
/*
* Licensed to the Nervousync Studio (NSYC) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.nervousync.generator;
/**
* Interface class of ID generator
* ID生成器的接口
*
* @author Steven Wee [email protected]
* @version $Revision: 1.0.0 $ $Date: Jul 06, 2022 12:37:26 $
*/
public interface IGenerator {
/**
* Generate ID value
* 生成ID值
*
* @return Generated value
* 生成的ID值
*/
T generate();
/**
* Generate ID value using given parameter
* 使用给定的参数生成ID值
*
* @param dataBytes Given parameter
* 给定的参数
*
* @return Generated value
* 生成的ID值
*/
T generate(byte[] dataBytes);
/**
* Destroy current generator instance
* 销毁当前生成器实例对象
*/
void destroy();
}