Skip to content

Commit

Permalink
add comment and reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
knonomura committed Mar 18, 2019
1 parent 664d5a5 commit ab88e6d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/PartitionController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace griddb {
*/
int64_t PartitionController::get_container_count(int32_t partition_index) {
int64_t value;
GSResult ret = gsGetPartitionContainerCount(mController, partition_index,&value);
GSResult ret = gsGetPartitionContainerCount(mController, partition_index, &value);

// Check ret, if error, throw exception
if (ret != GS_RESULT_OK) {
Expand Down
18 changes: 18 additions & 0 deletions src/TimeSeriesProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,41 @@ namespace griddb {
}
TimeSeriesProperties::~TimeSeriesProperties() {
}
/*
* Set attribute: mTsProps.rowExpirationTime & mTsProps.rowExpirationTimeUnit
*/
void TimeSeriesProperties::set_row_expiration_time(int elapsedTime,
GSTimeUnit timeUnit) {
mTsProps.rowExpirationTime = elapsedTime;
mTsProps.rowExpirationTimeUnit = timeUnit;
}
/*
* Set attribute: mTsProps.expirationDivisionCount
*/
void TimeSeriesProperties::set_expiration_division_count(int count) {
mTsProps.expirationDivisionCount = count;
}
/*
* Get attribute: mTsProps.rowExpirationTime
*/
int TimeSeriesProperties::get_row_expiration_time() {
return mTsProps.rowExpirationTime;
}
/*
* Get attribute: mTsProps.rowExpirationTimeUnit
*/
GSTimeUnit TimeSeriesProperties::get_row_expiration_time_unit() {
return mTsProps.rowExpirationTimeUnit;
}
/*
* Get attribute: mTsProps.expirationDivisionCount
*/
int TimeSeriesProperties::get_expiration_division_count() {
return mTsProps.expirationDivisionCount;
}
/*
* Get attribute: mTsProps
*/
GSTimeSeriesProperties* TimeSeriesProperties::gs_ptr() {
return &mTsProps;
}
Expand Down
7 changes: 4 additions & 3 deletions src/TimeSeriesProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
namespace griddb {

class TimeSeriesProperties {
GSTimeSeriesProperties mTsProps;
private:
GSTimeSeriesProperties mTsProps;

public:
TimeSeriesProperties(const GSTimeSeriesProperties* timeSeriesProps);
TimeSeriesProperties(int32_t elapsedTime, GSTimeUnit timeUnit, int32_t ExpirationDivisionCount);
~TimeSeriesProperties();

// APIs to set values for expiration_time and expiration_division_count
void set_row_expiration_time(int32_t elapsedTime, GSTimeUnit timeUnit);
void set_expiration_division_count(int32_t count);

// APIs to get values of expiration_time, expiration_time_unit, expiration_division_count and TimeSeriesProperties
int get_row_expiration_time();
GSTimeUnit get_row_expiration_time_unit();
int get_expiration_division_count();
Expand Down

0 comments on commit ab88e6d

Please sign in to comment.