com.azure.cosmos.implementation.uuid.UUIDType Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-cosmos Show documentation
Show all versions of azure-cosmos Show documentation
This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension Reactor support) for Azure Cosmos DB SQL API
/* JUG Java Uuid Generator
*
* Copyright (c) 2002- Tatu Saloranta, [email protected]
*
* Licensed under the License specified in the file LICENSE which is
* included with the source code.
* You may not use this file except in compliance with the License.
*
* 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.
*/
/*
* Portions Copyright (c) Microsoft Corporation
*/
package com.azure.cosmos.implementation.uuid;
/**
* Enumeration of different flavors of UUIDs: 5 specified by specs
* (RFC-4122)
* and one
* virtual entry ("UNKNOWN") to represent invalid one that consists of
* all zero bites
*/
public enum UUIDType {
TIME_BASED(1),
DCE(2),
NAME_BASED_MD5(3),
RANDOM_BASED(4),
NAME_BASED_SHA1(5),
UNKNOWN(0)
;
private final int _raw;
private UUIDType(int raw) {
_raw = raw;
}
/**
* Returns "raw" type constants, embedded within UUID bytes.
*/
public int raw() { return _raw; }
}