示例#1
0
		internal Robin(Archive parentArc, int rows, bool shouldInitialize)
		{
			this.parentArc = parentArc;
			pointer = new RrdInt(this);
			values = new RrdDoubleArray(this, rows);
			this.rows = rows;
			if (shouldInitialize)
			{
				pointer.Set(0);
				values.Set(0, Double.NaN, rows);
			}
		}
示例#2
0
		internal Header(RrdDb parentDb, RrdDef rrdDef)
		{
			bool shouldInitialize = rrdDef != null;
			this.parentDb = parentDb;
			signature = new RrdString(this); // NOT constant, may NOT be cached
			step = new RrdLong(this, true); // constant, may be cached
			dsCount = new RrdInt(this, true); // constant, may be cached
			arcCount = new RrdInt(this, true); // constant, may be cached
			lastUpdateTime = new RrdLong(this);
			if (shouldInitialize)
			{
				signature.Set(DEFAULT_SIGNATURE);
				step.Set(rrdDef.Step);
				dsCount.Set(rrdDef.DataSourceDefinitions.Length);
				arcCount.Set(rrdDef.ArchiveDefinitions.Length);
				lastUpdateTime.Set(rrdDef.StartTime);
			}
		}