mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge 3.2 to HEAD:
15128: Merge 3.1 to 3.2: 15114: Added support for impersonation level sharing mode check, to fix Office2007 file open issue. ETHREEOH-2320. 15130: Record-only 15340: Merge 3.1 to 3.2: 14359: Fixed native call being used when <disableNative/> was configured. ETHREEOH-2105. (Record-only) 14484: Merged HEAD to v3.1: (Record-only) 13943 Added FTP IPv6 configuration, via the <IPv6 state="enabled|disabled"/> tag. Added the ftp.ipv6 property. MOB-714. 14523: Add trailing 'A' to CIFS server name, removed by recent checkin. (Record-only) 14561: Change the file server config bean to use the 'org.alfresco.fileserver' logging level. 14916: Fixes for local domain lookup when WINS is configured. ETHREEOH-2263. 14922: Merge HEAD to V3.1 14626: Fixes for the client side Windows desktop action application. part of ETHREEOH-401 15155: Fixes to client side desktop action exe handling of paths that are not mapped to the root of the Alfresco share. ETHREEOH-1613 15341: Record-only 15549: Check for null ClientInfo in the setCurrentUser() method and clear the auth context. Part of ETHREEOH-2538. 15550: Fixed performance issue in the continue search code, add warn level output of folder search timing. 15564: Merge 3.1 to 3.2: 14964: Port fix for convert content I/O exceptions to file server exceptions during write and truncate (part 2). ETWOTWO-1241 15233: Ignore nodes that no longer exist during the second stage of a file server folder search. 15234: Fixed incorrect length check when buffering MSOffice document writes. 15565: Record-only 15568: Fix for cut/paste file between folders on CIFS. ETHREEOH-2323 + ENH-515. 15569: Record-only 15644: Changed filesystem debug setting so it works with old and new config styles. 15786: Record-only 15787: Port of repo filesystem MS Office document locking fix. ETHREEOH-2579 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16122 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -75,9 +75,10 @@ public class FileState
|
||||
|
||||
private int m_openCount;
|
||||
|
||||
// Sharing mode
|
||||
// Sharing mode and PID of first process to open the file
|
||||
|
||||
private int m_sharedAccess = SharingMode.READWRITE + SharingMode.DELETE;
|
||||
private int m_pid = -1;
|
||||
|
||||
// File lock list, allocated once there are active locks on this file
|
||||
|
||||
@@ -203,6 +204,16 @@ public class FileState
|
||||
return m_sharedAccess;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the PID of the first process to open the file, or -1 if the file is not open
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public final int getProcessId()
|
||||
{
|
||||
return m_pid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there are active locks on this file
|
||||
*
|
||||
@@ -279,6 +290,11 @@ public class FileState
|
||||
else
|
||||
m_openCount--;
|
||||
|
||||
// Clear the PID if the file is no longer open
|
||||
|
||||
if ( m_openCount == 0)
|
||||
m_pid = -1;
|
||||
|
||||
return m_openCount;
|
||||
}
|
||||
|
||||
@@ -430,6 +446,17 @@ public class FileState
|
||||
m_sharedAccess = mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the PID of the process opening the file
|
||||
*
|
||||
* @param pid int
|
||||
*/
|
||||
public final void setProcessId(int pid)
|
||||
{
|
||||
if ( getOpenCount() == 0)
|
||||
m_pid = pid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the file path
|
||||
*
|
||||
@@ -703,6 +730,8 @@ public class FileState
|
||||
str.append(getFileStatus());
|
||||
str.append(":Opn=");
|
||||
str.append(getOpenCount());
|
||||
str.append("/");
|
||||
str.append(getProcessId());
|
||||
|
||||
str.append(",Expire=");
|
||||
str.append(getSecondsToExpire(System.currentTimeMillis()));
|
||||
|
Reference in New Issue
Block a user