greenplumn CIdGenerator 源码

  • 2022-08-18
  • 浏览 (179)

greenplumn CIdGenerator 代码

文件路径:/src/backend/gporca/libnaucrates/src/CIdGenerator.cpp

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2011 Greenplum, Inc.
//
//	@filename:
//		CIdGenerator.cpp
//
//	@doc:
//		Implementing the ULONG Counter
//---------------------------------------------------------------------------

#include "naucrates/dxl/CIdGenerator.h"

#include "gpos/base.h"

using namespace gpdxl;
using namespace gpos;

CIdGenerator::CIdGenerator(ULONG start_id) : id(start_id)
{
}

//---------------------------------------------------------------------------
//	@function:
//		CIdGenerator::next_id
//
//	@doc:
//		Returns the next unique id
//
//---------------------------------------------------------------------------
ULONG
CIdGenerator::next_id()
{
	return id++;
}

//---------------------------------------------------------------------------
//	@function:
//		CIdGenerator::current_id
//
//	@doc:
//		Returns the current unique id used
//
//---------------------------------------------------------------------------
ULONG
CIdGenerator::current_id() const
{
	return id;
}


// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CCostModelConfigSerializer 源码

greenplumn CDXLUtils 源码

greenplumn exception 源码

greenplumn init 源码

greenplumn traceflags 源码

0  赞