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

📄 cwp3758.htm

📁 Perst开源实时数据库
💻 HTM
字号:
<!-- saved from url=(0007)http:// -->
<HTML><HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><TITLE>Perst.IResource.ExclusiveLock</TITLE><LINK REL=STYLESHEET HREF="../CommentReport.css" TYPE="text/css"></HEAD><BODY topmargin=0 rightmargin=0 leftmargin=0 style="background-image: url(../titletile.jpg); background-repeat:repeat-x; background-position: 0 0;" ><DIV CLASS="PageHeading">Perst.IResource.ExclusiveLock Function</DIV><DIV CLASS="Description">
Lock persistent object in exclusive mode. Only one thread can lock object in exclusive mode at each
moment of time. Shared or exclusive lock requests of other threads will be blocked until
this lock is released.
shared locks on this objects, but not exclusive lock can be set until this lock is released.

This lock is reentrant, so thread owning the lock can successfully retrieve the lock many times
(and correspondent number of unlocks is needed to release the lock).

Locking the object doesn't prevent other threads from accessing the object - 
it only has influence on <code>sharedLock</code> and <code>exclusiveLock</code> methods.
So programmer should set proper lock before accessing the object in multithreaded application.

Only persistent object (object which were assigned to the the storage either implicitly by
saving some other persistent object referencing this object, either explicitly by 
<code>Storage.makeObjectPersistent</code> method.   
<P></DIV><IMG src="../GradLeft.jpg" width=7 height=378 alt="" border="0" style="position:absolute; left:10; top:18;z-Index:2"><IMG src="../GradTop.jpg" width=352 height=7 alt="" border="0" align="top" style="position:absolute; left:10; top:18; z-index:1"><DIV CLASS="Remarks"><SPAN CLASS="RemarkHdrX">Public bool ExclusiveLock (long)</SPAN></DIV><TABLE CLASS="InfoTable" cellpadding=0 cellspacing=0><TR height=20><TD width=20>&nbsp;</TD><TD valign=top align=left width=9 bgcolor="#cccc66"><IMG SRC="../graycorner.jpg" align=top></TD><TD CLASS="TableLightLabel" >Type</TD><TD CLASS="TableLightLabel" >Name</TD><TD CLASS="TableLightLabel" >Description</TD><TD width=20>&nbsp;</TD></TR><TR height=20><TD width=20>&nbsp;</TD><TD CLASS="TableLightDesc">&nbsp;</TD><TD CLASS="TableLightDesc">long</TD><TD CLASS="TableLightDesc">timeout</TD><TD CLASS="TableLightDesc">timeout of operation in milliseconds. If timeout is 0 and
lock can not be granted, the request will fail immediately. Otherwise the system will try
to grant lock within specified amount of time.
</TD><TD width=20>&nbsp;</TD></TR></TABLE><TABLE CLASS="InfoTable" cellpadding=0 cellspacing=0><TR height=20><TD width=20>&nbsp;</TD><TD valign=top align=left width=9 bgcolor="#cccc66"><IMG SRC="../graycorner.jpg" align=top></TD><TD CLASS="TableLightLabel" WIDTH=206>Return</TD><TD CLASS="TableLightLabel" >Description</TD><TD width=20>&nbsp;</TD></TR><TR height=20><TD width=20>&nbsp;</TD><TD CLASS="TableLightDesc">&nbsp;</TD><TD CLASS="TableLightDesc">bool</TD><TD CLASS="TableLightDesc">
<DL>
<DT><code>true</code> if lock is successfully granted</DT>
<DT><code>false</code> if lock can not be granted within specified time</DT>
</DL>
<P></TD><TD width=20>&nbsp;</TD></TR></TABLE><DIV CLASS="RemarkHdr"><B>Other overloads:</B><BR></DIV><DIV CLASS="Remarks">Perst.IResource.ExclusiveLock()</DIV></BODY></HTML>

⌨️ 快捷键说明

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