📄 cwp4240.htm
字号:
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4280.HTM" TARGET="CNTFRAME">CreateBlob</A></TD><TD CLASS="TableLightDesc">
Create new BLOB. Create object for storing large binary data.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4281.HTM" TARGET="CNTFRAME">CreateTimeSeries</A></TD><TD CLASS="TableLightDesc">
Create new time series object.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4282.HTM" TARGET="CNTFRAME">CreatePatriciaTrie</A></TD><TD CLASS="TableLightDesc">
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.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4283.HTM" TARGET="CNTFRAME">Close</A></TD><TD CLASS="TableLightDesc"> Commit transaction (if needed) and close the storage
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4284.HTM" TARGET="CNTFRAME">SetGcThreshold</A></TD><TD CLASS="TableLightDesc"> Set threshold for initiation of garbage collection. By default garbage collection is disable (threshold is set to
Int64.MaxValue). If it is set to the value different fro Long.MAX_VALUE, GC will be started each time when
delta between total size of allocated and deallocated objects exceeds specified threashold OR
after reaching end of allocation bitmap in allocator.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4285.HTM" TARGET="CNTFRAME">Gc</A></TD><TD CLASS="TableLightDesc">Explicit start of garbage collector
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4286.HTM" TARGET="CNTFRAME">ExportXML</A></TD><TD CLASS="TableLightDesc"> Export database in XML format
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4287.HTM" TARGET="CNTFRAME">ImportXML</A></TD><TD CLASS="TableLightDesc"> Import data from XML file
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4288.HTM" TARGET="CNTFRAME">GetObjectByOID</A></TD><TD CLASS="TableLightDesc">
Retrieve object by OID. This method should be used with care because
if object is deallocated, its OID can be reused. In this case
getObjectByOID will return reference to the new object with may be
different type.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4289.HTM" TARGET="CNTFRAME">MakePersistent</A></TD><TD CLASS="TableLightDesc">
Explicitely make object peristent. Usually objects are made persistent
implicitlely using "persistency on reachability apporach", but this
method allows to do it explicitly. If object is already persistent, execution of
this method has no effect.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4290.HTM" TARGET="CNTFRAME">SetProperty</A></TD><TD CLASS="TableLightDesc">
Set database property. This method should be invoked before opening database.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4291.HTM" TARGET="CNTFRAME">SetProperties</A></TD><TD CLASS="TableLightDesc">Set database properties. This method should be invoked before opening database.
For list of supported properties please see <see cref="SetProperty">setProperty</see>.
All not recognized properties are ignored.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4292.HTM" TARGET="CNTFRAME">GetProperty</A></TD><TD CLASS="TableLightDesc">Get property value.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4293.HTM" TARGET="CNTFRAME">GetProperties</A></TD><TD CLASS="TableLightDesc">
Get all set properties
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4294.HTM" TARGET="CNTFRAME">Merge</A></TD><TD CLASS="TableLightDesc">
Merge results of several index searches. This method efficiently merge selections without loading objects themselve
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4295.HTM" TARGET="CNTFRAME">Join</A></TD><TD CLASS="TableLightDesc">
Join results of several index searches. This method efficiently join selections without loading objects themselve
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4296.HTM" TARGET="CNTFRAME">SetListener</A></TD><TD CLASS="TableLightDesc">
Set storage listener.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4297.HTM" TARGET="CNTFRAME">Loader</A></TD><TD CLASS="TableLightDesc">
Set class loader. This class loader will be used to locate classes for
loaded class descriptors. If class loader is not specified or
it did find the class, then class will be searched in all active assemblies
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4299.HTM" TARGET="CNTFRAME">CreateClass</A></TD><TD CLASS="TableLightDesc">
Create persistent class wrapper. This wrapper will implement virtual properties
defined in specified class or interface, performing transparent loading and storing of persistent object
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4300.HTM" TARGET="CNTFRAME">BeginThreadTransaction</A></TD><TD CLASS="TableLightDesc">
Begin per-thread transaction. Three types of per-thread transactions are supported:
exclusive, cooperative and serializable. In case of exclusive transaction, only one
thread can update the database. In cooperative mode, multiple transaction can work
concurrently and commit() method will be invoked only when transactions of all threads
are terminated. Serializable transactions can also work concurrently. But unlike
cooperative transaction, the threads are isolated from each other. Each thread
has its own associated set of modified objects and committing the transaction will cause
saving only of these objects to the database.To synchronize access to the objects
in case of serializable transaction programmer should use lock methods
of IResource interface. Shared lock should be set before read access to any object,
and exclusive lock - before write access. Locks will be automatically released when
transaction is committed (so programmer should not explicitly invoke unlock method)
In this case it is guaranteed that transactions are serializable.
It is not possible to use <code>IPersistent.store()</code> method in
serializable transactions. That is why it is also not possible to use Index and FieldIndex
containers (since them are based on B-Tree and B-Tree directly access database pages
and use <code>store()</code> method to assign OID to inserted object.
You should use <code>SortedCollection</code> based on T-Tree instead or alternative
B-Tree implemenataion (set "perst.alternative.btree" property).
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4301.HTM" TARGET="CNTFRAME">EndThreadTransaction</A></TD><TD CLASS="TableLightDesc">
End per-thread transaction started by beginThreadTransaction method.
<ul>
<li>If transaction is <i>exclusive</i>, this method commits the transaction and
allows other thread to proceed.</li><li>
If transaction is <i>serializable</i>, this method commits sll changes done by this thread
and release all locks set by this thread.</li><li>
If transaction is <i>cooperative</i>, this method decrement counter of cooperative
transactions and if it becomes zero - commit the work</li></ul>
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4302.HTM" TARGET="CNTFRAME">EndThreadTransaction</A></TD><TD CLASS="TableLightDesc">
End per-thread cooperative transaction with specified maximal delay of transaction
commit. When cooperative transaction is ended, data is not immediately committed to the
disk (because other cooperative transaction can be active at this moment of time).
Instead of it cooperative transaction counter is decremented. Commit is performed
only when this counter reaches zero value. But in case of heavy load there can be a lot of
requests and so a lot of active cooperative transactions. So transaction counter never reaches zero value.
If system crash happens a large amount of work will be lost in this case.
To prevent such scenario, it is possible to specify maximal delay of pending transaction commit.
In this case when such timeout is expired, new cooperative transaction will be blocked until
transaction is committed.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4303.HTM" TARGET="CNTFRAME">RollbackThreadTransaction</A></TD><TD CLASS="TableLightDesc">
Rollback per-thread transaction. It is safe to use this method only for exclusive transactions.
In case of cooperative transactions, this method rollback results of all transactions.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4304.HTM" TARGET="CNTFRAME">GetMemoryDump</A></TD><TD CLASS="TableLightDesc">
Get database memory dump. This function returns hashmap which key is classes
of stored objects and value - MemoryUsage object which specifies number of instances
of particular class in the storage and total size of memory used by these instance.
Size of internal database structures (object index, memory allocation bitmap) is associated with
<code>Storage</code> class. Size of class descriptors - with <code>System.Type</code> class.
<p>This method traverse the storage as garbage collection do - starting from the root object
and recursively visiting all reachable objects. So it reports statistic only for visible objects.
If total database size is significantly larger than total size of all instances reported
by this method, it means that there is garbage in the database. You can explicitly invoke
garbage collector in this case.</p>
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4305.HTM" TARGET="CNTFRAME">UsedSize</A></TD><TD CLASS="TableLightDesc">
Get total size of all allocated objects in the database
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4307.HTM" TARGET="CNTFRAME">DatabaseSize</A></TD><TD CLASS="TableLightDesc">
Get size of the database
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4309.HTM" TARGET="CNTFRAME">RegisterCustomAllocator</A></TD><TD CLASS="TableLightDesc">
Register custom allocator for specified class. Instances of this and derived classes
will be allocated in the storage using specified allocator.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4310.HTM" TARGET="CNTFRAME">CreateBitmapAllocator</A></TD><TD CLASS="TableLightDesc">
Create bitmap custom allocator
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4311.HTM" TARGET="CNTFRAME">SetCustomSerializer</A></TD><TD CLASS="TableLightDesc">
Set custom serializer used fot packing/unpacking fields of persistent objects which types implemplemet
CustomSerializable interface
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4312.HTM" TARGET="CNTFRAME">ClearObjectCache</A></TD><TD CLASS="TableLightDesc">
Clear database object cache. This method can be used with "strong" object cache to avoid memory overflow.
It is no valid to invoke this method when there are some uncommitted changes in the database
(some modified objects). Also all variables containing references to persistent object should be reset after
invocation of this method - it is not correct to accessed object directly though such variables, objects
has to be reloaded from the storage
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4313.HTM" TARGET="CNTFRAME">deallocateObject</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4314.HTM" TARGET="CNTFRAME">storeObject</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4315.HTM" TARGET="CNTFRAME">storeFinalizedObject</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4316.HTM" TARGET="CNTFRAME">loadObject</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4317.HTM" TARGET="CNTFRAME">modifyObject</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4318.HTM" TARGET="CNTFRAME">lockObject</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -