A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/nst__service__parameters_8cpp_source.html below:

NCBI C++ ToolKit: src/app/netstorage/nst_service_parameters.cpp Source File

71

service.

SetString

(

"ProlongOnRelocate"

,

132  double

in_ttls)

const 149

effective_ttl =

m_TTL

;

153  static_cast<long>

(individual_obj_ttl.

m_Value

));

157  return

effective_ttl;

203  for

(list<string>::const_iterator k = new_services.begin();

204

k != new_services.end(); ++k) {

206

new_default_service_props);

212

vector<string> added;

213

vector<string> deleted;

214

vector<string> modified;

218  if

(new_service_conf.

find

(k->first) == new_service_conf.

end

()) {

219

deleted.push_back(k->first);

221  if

(

m_Services

[k->first] != new_service_conf[k->first])

222

modified.push_back(k->first);

227

k != new_service_conf.

end

(); ++k)

229

added.push_back(k->first);

254

diff.

SetByKey

(

"ProlongOnRead"

, prolong_diff);

266

diff.

SetByKey

(

"ProlongOnWrite"

, prolong_diff);

278

diff.

SetByKey

(

"ProlongOnRelocate"

, prolong_diff);

281  if

(!added.empty() || !deleted.empty() || !modified.empty()) {

284  if

(!added.empty()) {

286  for

(vector<string>::const_iterator k = added.begin();

287

k != added.end(); ++k)

289

services_diff.

SetByKey

(

"Added"

, add_node);

292  if

(!deleted.empty()) {

294  for

(vector<string>::const_iterator k = deleted.begin();

295

k != deleted.end(); ++k)

297

services_diff.

SetByKey

(

"Deleted"

, del_node);

300  if

(!modified.empty()) {

302  for

(vector<string>::const_iterator k = modified.begin();

303

k != modified.end(); ++k) {

307

new_service_conf[*k].GetTTLAsString()) {

314

new_service_conf[*k].GetTTLAsString()));

315

mod_diff.

SetByKey

(

"TTL"

, val_diff);

318  if

(

m_Services

[*k].GetProlongOnReadAsString() !=

319

new_service_conf[*k].GetProlongOnReadAsString()) {

326

new_service_conf[*k].GetProlongOnReadAsString()));

327

mod_diff.

SetByKey

(

"ProlongOnRead"

, val_diff);

330  if

(

m_Services

[*k].GetProlongOnWriteAsString() !=

331

new_service_conf[*k].GetProlongOnWriteAsString()) {

335  m_Services

[*k].GetProlongOnWriteAsString()));

338

new_service_conf[*k].GetProlongOnWriteAsString()));

339

mod_diff.

SetByKey

(

"ProlongOnWrite"

, val_diff);

342  if

(

m_Services

[*k].GetProlongOnRelocateAsString() !=

343

new_service_conf[*k].GetProlongOnRelocateAsString()) {

347  m_Services

[*k].GetProlongOnRelocateAsString()));

350

new_service_conf[*k].GetProlongOnRelocateAsString()));

351

mod_diff.

SetByKey

(

"ProlongOnRelocate"

, val_diff);

356

services_diff.

SetByKey

(

"Modified"

, serv_diff);

358

diff.

SetByKey

(

"Services"

, services_diff);

374

default_service_properties.

SetByKey

(

"DefaultServiceProperties"

,

376

services.

Append

(default_service_properties);

380  CJsonNode

single_service(k->second.Serialize());

382

single_service.

SetString

(

"Name"

, k->first);

383

services.

Append

(single_service);

431

ttl = s->second.GetTTL();

439  const string

& service,

457

prolong_on_read = s->second.GetProlongOnRead(individual_obj_ttl);

465  const string

& service,

483

prolong_on_write = s->second.GetProlongOnWrite(individual_obj_ttl);

491  const string

& service,

501

prolong_on_relocate =

509

prolong_on_relocate = s->second.GetProlongOnRelocate(individual_obj_ttl);

548  const string

& section,

555  if

(reg.

HasEntry

(section,

"ttl"

)) {

567  if

(reg.

HasEntry

(section,

"prolong_on_read"

)) {

576  if

(reg.

HasEntry

(section,

"prolong_on_write"

)) {

585  if

(reg.

HasEntry

(section,

"prolong_on_relocate"

)) {

623  if

(!

value

.empty()) {

627

new_val =

val

.m_Value;

642

list<string> metadata_services;

643

list<string> sections;

644  const string

prefix =

"service_"

;

650  for

(list<string>::const_iterator k = sections.begin();

651

k != sections.end(); ++k) {

653  string

service_name =

string

(k->c_str() + prefix.size());

654  if

(service_name.empty())

657  if

(reg.

HasEntry

(*k,

"metadata"

)) {

659  if

(reg.

GetBool

(*k,

"metadata"

,

false

)) {

660

metadata_services.push_back(service_name);

673  return

metadata_services;

static CJsonNode NewArrayNode()

Create a new JSON array node.

void SetString(const string &key, const string &value)

Set a JSON object element to the specified string value.

void AppendString(const string &value)

For an array node, add a string node at the end of the array.

void SetByKey(const string &key, CJsonNode::TInstance value)

For a JSON object node, insert a new element or update an existing element.

static CJsonNode NewStringNode(const string &value)

Create a new JSON string node.

static CJsonNode NewObjectNode()

Create a new JSON object node.

void Append(CJsonNode::TInstance value)

For an array node, add a new element at the end of the array.

CTimeSpan m_ProlongOnWrite

void SetProlongOnRead(const CTimeSpan &new_val)

TNSTDBValue< CTimeSpan > GetProlongOnWrite(const TNSTDBValue< Int8 > &individual_obj_ttl) const

void SetTTL(const TNSTDBValue< CTimeSpan > &new_val)

CTimeSpan m_ProlongOnRelocate

string GetProlongOnWriteAsString(void) const

double m_ProlongOnReadInTTLs

TNSTDBValue< CTimeSpan > m_TTL

double m_ProlongOnRelocateInTTLs

CTimeSpan m_ProlongOnRead

TNSTDBValue< CTimeSpan > x_GetProlongInTTLs(double multiplier, const TNSTDBValue< Int8 > &individual_obj_ttl) const

string x_GetProlongAsString(const CTimeSpan &as_time_span, double in_ttls) const

string GetProlongOnRelocateAsString(void) const

CJsonNode Serialize(void) const

TNSTDBValue< CTimeSpan > GetTTL(void) const

double m_ProlongOnWriteInTTLs

string GetTTLAsString(void) const

TNSTDBValue< CTimeSpan > GetProlongOnRead(const TNSTDBValue< Int8 > &individual_obj_ttl) const

TNSTDBValue< CTimeSpan > GetProlongOnRelocate(const TNSTDBValue< Int8 > &individual_obj_ttl) const

void SetProlongOnWrite(const CTimeSpan &new_val)

string GetProlongOnReadAsString(void) const

set< string, PNocase > m_ServicesExplicitNoMetadata

bool GetTTL(const string &service, TNSTDBValue< CTimeSpan > &ttl) const

CTimeSpan x_ReadProlongProperty(const string &value)

list< string > x_GetMetadataServices(const IRegistry &reg)

CNSTServiceProperties GetDefaultProperties(void) const

CNSTServiceProperties m_DefaultProperties

bool GetProlongOnRead(const string &service, const TNSTDBValue< Int8 > &individual_obj_ttl, TNSTDBValue< CTimeSpan > &prolong_on_read) const

set< string, PNocase > m_ServicesDefaultNoMetadata

double x_ReadProlongInTTLs(string &value) const

CJsonNode Serialize(void) const

bool GetServiceProperties(const string &service, CNSTServiceProperties &props) const

TServiceProperties m_Services

CNSTServiceProperties m_LBSMDTestServiceProperties

bool GetProlongOnWrite(const string &service, const TNSTDBValue< Int8 > &individual_obj_ttl, TNSTDBValue< CTimeSpan > &prolong_on_write) const

CJsonNode ReadConfiguration(const IRegistry &reg)

EServiceMetadataPresence IsKnown(const string &service) const

bool GetProlongOnRelocate(const string &service, const TNSTDBValue< Int8 > &individual_obj_ttl, TNSTDBValue< CTimeSpan > &prolong_on_relocate) const

CNSTServiceProperties x_ReadServiceProperties(const IRegistry &reg, const string &section, const CNSTServiceProperties &defaults)

container_type::const_iterator const_iterator

const_iterator begin() const

const_iterator end() const

const_iterator find(const key_type &key) const

iterator_bool insert(const value_type &val)

const_iterator find(const key_type &key) const

const_iterator end() const

virtual bool GetBool(const string &section, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const

Get boolean value of specified parameter name.

virtual void EnumerateSections(list< string > *sections, TFlags flags=fAllLayers) const

Enumerate section names.

virtual bool HasEntry(const string &section, const string &name=kEmptyStr, TFlags flags=0) const

virtual string GetString(const string &section, const string &name, const string &default_value, TFlags flags=0) const

Get the parameter string value.

static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)

Check if a string ends with a specified suffix value.

static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)

Convert string to double.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive equality of a substring with another string.

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

@ fAllowTrailingSpaces

Ignore trailing whitespace characters.

@ eNocase

Case insensitive compare.

double GetAsDouble(void) const

Return time span as number of seconds.

string AsSmartString(ESmartStringPrecision precision, ERound rounding, ESmartStringZeroMode zero_mode=eSSZ_SkipZero) const

Transform time span to "smart" string.

const GenericPointer< typename T::ValueType > T2 value

TNSTDBValue< CTimeSpan > ReadTimeSpan(const string &reg_value, bool allow_infinity)

const string k_LBSMDNSTTestService

const double k_ProlongInTTLsNotConfigured

const CTimeSpan::TSmartStringFlags kTimeSpanFlags


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4