'Declaration
Public Overloads Shared Function Lock( _ ByVal requester As Object, _ ByVal indexPath As String, _ ByVal lockName As String, _ ByVal timeoutSeconds As Integer, _ ByVal deleteOnClose As Boolean _ ) As InterprocessLock
public static InterprocessLock Lock( object requester, string indexPath, string lockName, int timeoutSeconds, bool deleteOnClose )
Parameters
- requester
- The object that is requesting the lock (useful for debugging purposes)
- indexPath
- The fully qualified path to the directory containing the index file of the repository
- lockName
- The name of the lock to get (locks are a combination of index and this name)
- timeoutSeconds
- The maximum number of seconds to wait on the lock before giving up.
- deleteOnClose
- Whether the lock file should be deleted on close or left around for reuse.
Return Value
A Repository Lock object if the lock could be obtained or Null if the lock timed out.