Moving to root below branch label

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2005 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2005-12-08 07:13:07 +00:00
commit e1e6508fec
1095 changed files with 230566 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.server.locking;
import org.alfresco.filesys.locking.FileLock;
import org.alfresco.filesys.server.SrvSession;
import org.alfresco.filesys.server.filesys.NetworkFile;
/**
* File Lock Listener Interface.
* <p>
* The file lock listener receives events when file locks are granted, released and denied.
*/
public interface FileLockListener
{
/**
* Lock has been granted on the specified file.
*
* @param sess SrvSession
* @param file NetworkFile
* @param lock FileLock
*/
void lockGranted(SrvSession sess, NetworkFile file, FileLock lock);
/**
* Lock has been released on the specified file.
*
* @param sess SrvSession
* @param file NetworkFile
* @param lock FileLock
*/
void lockReleased(SrvSession sess, NetworkFile file, FileLock lock);
/**
* Lock has been denied on the specified file.
*
* @param sess SrvSession
* @param file NetworkFile
* @param lock FileLock
*/
void lockDenied(SrvSession sess, NetworkFile file, FileLock lock);
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.server.locking;
import org.alfresco.filesys.server.SrvSession;
import org.alfresco.filesys.server.filesys.TreeConnection;
/**
* File Locking Interface
* <p>
* Optional interface that a DiskInterface driver can implement to provide file locking support.
*/
public interface FileLockingInterface
{
/**
* Return the lock manager implementation associated with this virtual filesystem
*
* @param sess SrvSession
* @param tree TreeConnection
* @return LockManager
*/
public LockManager getLockManager(SrvSession sess, TreeConnection tree);
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.server.locking;
import java.io.IOException;
import org.alfresco.filesys.locking.FileLock;
import org.alfresco.filesys.locking.LockConflictException;
import org.alfresco.filesys.locking.NotLockedException;
import org.alfresco.filesys.server.SrvSession;
import org.alfresco.filesys.server.filesys.NetworkFile;
import org.alfresco.filesys.server.filesys.TreeConnection;
/**
* Lock Manager Interface
* <p>
* A lock manager implementation provides file locking support for a virtual filesystem.
*/
public interface LockManager
{
/**
* Lock a byte range within a file, or the whole file.
*
* @param sess SrvSession
* @param tree TreeConnection
* @param file NetworkFile
* @param lock FileLock
* @exception LockConflictException
* @exception IOException
*/
public void lockFile(SrvSession sess, TreeConnection tree, NetworkFile file, FileLock lock)
throws LockConflictException, IOException;
/**
* Unlock a byte range within a file, or the whole file
*
* @param sess SrvSession
* @param tree TreeConnection
* @param file NetworkFile
* @param lock FileLock
* @exception NotLockedException
* @exception IOException
*/
public void unlockFile(SrvSession sess, TreeConnection tree, NetworkFile file, FileLock lock)
throws NotLockedException, IOException;
/**
* Create a lock object, allows the FileLock object to be extended
*
* @param sess SrvSession
* @param tree TreeConnection
* @param file NetworkFile
* @param offset long
* @param len long
* @param pid int
* @return FileLock
*/
public FileLock createLockObject(SrvSession sess, TreeConnection tree, NetworkFile file, long offset, long len,
int pid);
/**
* Release all locks that a session has on a file. This method is called to perform cleanup if a
* file is closed that has active locks or if a session abnormally terminates.
*
* @param sess SrvSession
* @param tree TreeConnection
* @param file NetworkFile
*/
public void releaseLocksForFile(SrvSession sess, TreeConnection tree, NetworkFile file);
}