⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 storage.cs

📁 Perst开源实时数据库
💻 CS
📖 第 1 页 / 共 5 页
字号:
        /// 
        /// </returns>
#if USE_GENERICS
        Link<T> CreateLink<T>(int initialSize) where T:class,IPersistent;
#else
        Link CreateLink(int initialSize);
#endif
		
        /// <summary>  Create new scalable set references to persistent objects.
        /// This container can effciently store small number of references as well 
        /// as very large number references. When number of memers is small, 
        /// Link class is used to store set members. When number of members exceed 
        /// some threshold, PersistentSet (based on B-Tree) is used instead.
        /// </summary>
        /// <returns>new empty set, new members can be added to the set later.
        /// </returns>
#if USE_GENERICS
        ISet<T> CreateScalableSet<T>() where T:class,IPersistent;
#else
        ISet CreateScalableSet();
#endif
		
        /// <summary>  Create new scalable set references to persistent objects.
        /// This container can effciently store small number of references as well 
        /// as very large number references. When number of memers is small, 
        /// Link class is used to store set members. When number of members exceed 
        /// some threshold, PersistentSet (based on B-Tree) is used instead.
        /// </summary>
        /// <param name="initialSize">initial size of the sety</param>
        /// <returns>new empty set, new members can be added to the set later.
        /// </returns>
#if USE_GENERICS
        ISet<T> CreateScalableSet<T>(int initialSize) where T:class,IPersistent;
#else
        ISet CreateScalableSet(int initialSize);
#endif
		
        /// <summary>
        /// Create new peristent list. Implementation of this list is based on B-Tree so it can efficiently
        /// handle large number of objects but in case of very small list memory overhead is too high.
        /// </summary>
        /// <returns>persistent object implementing list</returns>
        ///
#if USE_GENERICS
        IPersistentList<T> CreateList<T>() where T:class,IPersistent;
#else
        IPersistentList CreateList();
#endif

        /// <summary>
        /// Create new scalable list of persistent objects.
        /// This container can effciently handle small lists as well as large lists                                                                          
        /// When number of memers is small, Link class is used to store set members.
        /// When number of members exceeds some threshold, PersistentList (based on B-Tree)                                                                                                                     
        /// is used instead.
        /// </summary>
        /// <returns>scalable set implementation</returns>
        ///
#if USE_GENERICS
        IPersistentList<T> CreateScalableList<T>() where T:class,IPersistent;
#else
        IPersistentList CreateScalableList();
#endif

        /// <summary>
        /// Create new scalable list of persistent objects.
        /// This container can effciently handle small lists as well as large lists 
        /// When number of memers is small, Link class is used to store set members.
        /// When number of members exceeds some threshold, PersistentList (based on B-Tree)
        /// is used instead.
        /// </summary>
        /// <param name="initialSize">initial size of the list</param>
        /// <returns>scalable set implementation</returns>
        ///
#if USE_GENERICS
        IPersistentList<T> CreateScalableList<T>(int initialSize) where T:class,IPersistent;
#else
        IPersistentList CreateScalableList(int initialSize);
#endif

#if USE_GENERICS
        /// <summary>
        /// Create scalable persistent map.
        /// This container can effciently handle both small and large number of members.
        /// For small maps, implementation  uses sorted array. For large maps - B-Tree.
        /// </summary>
        /// <returns>scalable persistent map implementation</returns>
        ///
        IPersistentMap<K,V> CreateMap<K,V>() where K:IComparable where V:class,IPersistent;
#else
        /// <summary>
        /// Create scalable persistent map.
        /// This container can effciently handle both small and large number of members.
        /// For small maps, implementation  uses sorted array. For large maps - B-Tree.
        /// </summary>
        /// <param name="keyType">Type of map key</param>
        /// <returns>scalable persistent map implementation</returns>
        ///
        IPersistentMap CreateMap(Type keyType);
#endif

#if USE_GENERICS
        /// <summary>
        /// Create scalable persistent map.
        /// This container can effciently handle both small and large number of members.
        /// For small maps, implementation  uses sorted array. For large maps - B-Tree.
        /// </summary>
        /// <param name="initialSize">initial size of the list</param>
        /// <returns>scalable persistent map implementation</returns>
        ///
        IPersistentMap<K,V> CreateMap<K,V>(int initialSize) where K:IComparable where V:class,IPersistent;
#else
        /// <summary>
        /// Create scalable persistent map.
        /// This container can effciently handle both small and large number of members.
        /// For small maps, implementation  uses sorted array. For large maps - B-Tree.
        /// </summary>
        /// <param name="keyType">Type of map key</param>
        /// <param name="initialSize">initial size of the list</param>
        /// <returns>scalable persistent map implementation</returns>
        ///
        IPersistentMap CreateMap(Type keyType, int initialSize);
#endif

        /// <summary> Create dynamcially extended array of reference to persistent objects.
        /// It is inteded to be used in classes using virtual properties to 
        /// access components of persistent objects.  
        /// </summary>
        /// <returns>new empty array, new members can be added to the array later.
        /// </returns>
#if USE_GENERICS
        PArray<T> CreateArray<T>() where T:class,IPersistent;
#else
        PArray CreateArray();
#endif
		
        /// <summary> Create dynamcially extended array of reference to persistent objects.
        /// It is inteded to be used in classes using virtual properties to 
        /// access components of persistent objects.  
        /// </summary>
        /// <param name="initialSize">initially allocated size of the array</param>
        /// <returns>new empty array, new members can be added to the array later.
        /// </returns>
#if USE_GENERICS
        PArray<T> CreateArray<T>(int initialSize) where T:class,IPersistent;
#else
        PArray CreateArray(int initialSize);
#endif
		
        /// <summary> Create relation object. Unlike link which represent embedded relation and stored
        /// inside owner object, this Relation object is standalone persisitent object
        /// containing references to owner and members of the relation
        /// </summary>
        /// <param name="owner">owner of the relation
        /// </param>
        /// <returns>object representing empty relation (relation with specified owner and no members), 
        /// new members can be added to the link later.
        /// 
        /// </returns>
#if USE_GENERICS
        Relation<M,O> CreateRelation<M,O>(O owner) where M:class,IPersistent where O:class,IPersistent;
#else
        Relation CreateRelation(IPersistent owner);
#endif


        /// <summary>
        /// Create new BLOB. Create object for storing large binary data.
        /// </summary>
        /// <returns>empty BLOB</returns>
        Blob CreateBlob();

#if USE_GENERICS
        /// <summary>
        /// Create new time series object. 
        /// </summary>
        /// <param name="blockSize">number of elements in the block</param>
        /// <param name="maxBlockTimeInterval">maximal difference in system ticks (100 nanoseconds) between timestamps 
        /// of the first and the last elements in a block. 
        /// If value of this parameter is too small, then most blocks will contains less elements 
        /// than preallocated. 
        /// If it is too large, then searching of block will be inefficient, because index search 
        /// will select a lot of extra blocks which do not contain any element from the 
        /// specified range.
        /// Usually the value of this parameter should be set as
        /// (number of elements in block)*(tick interval)*2. 
        /// Coefficient 2 here is used to compencate possible holes in time series.
        /// For example, if we collect stocks data, we will have data only for working hours.
        /// If number of element in block is 100, time series period is 1 day, then
        /// value of maxBlockTimeInterval can be set as 100*(24*60*60*10000000L)*2
        /// </param>
        /// <returns>new empty time series</returns>
        TimeSeries<T> CreateTimeSeries<T>(int blockSize, long maxBlockTimeInterval) where T:TimeSeriesTick;
#else
        /// <summary>
        /// Create new time series object. 
        /// </summary>
        /// <param name="blockClass">class derived from TimeSeriesBlock</param>
        /// <param name="maxBlockTimeInterval">maximal difference in system ticks (100 nanoseconds) between timestamps 
        /// of the first and the last elements in a block. 
        /// If value of this parameter is too small, then most blocks will contains less elements 
        /// than preallocated. 
        /// If it is too large, then searching of block will be inefficient, because index search 
        /// will select a lot of extra blocks which do not contain any element from the 
        /// specified range.
        /// Usually the value of this parameter should be set as
        /// (number of elements in block)*(tick interval)*2. 
        /// Coefficient 2 here is used to compencate possible holes in time series.
        /// For example, if we collect stocks data, we will have data only for working hours.
        /// If number of element in block is 100, time series period is 1 day, then
        /// value of maxBlockTimeInterval can be set as 100*(24*60*60*10000000L)*2
        /// </param>
        /// <returns>new empty time series</returns>
        TimeSeries CreateTimeSeries(Type blockClass, long maxBlockTimeInterval);
#endif
		
        /// <summary>
        /// Create PATRICIA trie (Practical Algorithm To Retrieve Information Coded In Alphanumeric)
        /// Tries are a kind of tree where each node holds a common part of one or more keys. 
        /// PATRICIA trie is one of the many existing variants of the trie, which adds path compression 
        /// by grouping common sequences of nodes together.
        /// This structure provides a very efficient way of storing values while maintaining the lookup time 
        /// for a key in O(N) in the worst case, where N is the length of the longest key. 
        /// This structure has it's main use in IP routing software, but can provide an interesting alternative 
        /// to other structures such as hashtables when memory space is of concern.
        /// </summary>
        /// <returns>created PATRICIA trie</returns>
        ///
#if USE_GENERICS
        PatriciaTrie<T> CreatePatriciaTrie<T>() where T:class,IPersistent;
#else
        PatriciaTrie CreatePatriciaTrie();
#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -