コード例 #1
0
ファイル: FileUsageStats.cs プロジェクト: masroore/db4o
 public _IVisitor4_98(LongByRef total)
 {
     this.total = total;
 }
コード例 #2
0
ファイル: FileUsageStats.cs プロジェクト: masroore/db4o
 /// <returns>
 ///     number of bytes used aggregated from all categories - should always be equal to
 ///     <see cref="FileSize()">FileSize()</see>
 /// </returns>
 public virtual long TotalUsage()
 {
     var total = new LongByRef(_fileHeader + _freespace + _idSystem + _classMetadata
                               + _freespaceUsage + _uuidUsage + _commitTimestampUsage);
     Tree.Traverse(_classUsageStats, new _IVisitor4_98(total));
     return total.value;
 }
コード例 #3
0
			public _IVisitor4_166(FileUsageStatsCollector _enclosing, LongByRef slotUsage, IMiscCollector
				 miscCollector, LongByRef miscUsage)
			{
				this._enclosing = _enclosing;
				this.slotUsage = slotUsage;
				this.miscCollector = miscCollector;
				this.miscUsage = miscUsage;
			}
コード例 #4
0
		private FileUsageStatsCollector.InstanceUsage ClassSlotUsage(ClassMetadata clazz)
		{
			if (!clazz.HasClassIndex())
			{
				return new FileUsageStatsCollector.InstanceUsage(0, 0);
			}
			IMiscCollector miscCollector = ((IMiscCollector)MiscCollectors[clazz.GetName()]);
			LongByRef slotUsage = new LongByRef();
			LongByRef miscUsage = new LongByRef();
			BTreeClassIndexStrategy index = (BTreeClassIndexStrategy)clazz.Index();
			index.TraverseAll(_db.SystemTransaction(), new _IVisitor4_166(this, slotUsage, miscCollector
				, miscUsage));
			return new FileUsageStatsCollector.InstanceUsage(slotUsage.value, miscUsage.value
				);
		}
コード例 #5
0
			public _IProcedure4_125(FileUsageStatsCollector _enclosing, LongByRef usage)
			{
				this._enclosing = _enclosing;
				this.usage = usage;
			}
コード例 #6
0
		private long FieldIndexUsage(ClassMetadata classMetadata)
		{
			LongByRef usage = new LongByRef();
			classMetadata.TraverseDeclaredFields(new _IProcedure4_125(this, usage));
			return usage.value;
		}