| java.lang.Object org.jboss.ha.framework.server.ClusterFileTransfer
ClusterFileTransfer | public class ClusterFileTransfer implements AsynchHAMembershipListener(Code) | | Handles transfering files on the cluster. Files are sent in small chunks at a time (up to MAX_CHUNK_BUFFER_SIZE bytes per
Cluster call).
author: Scott Marlow. version: $Revision: 62037 $ |
Inner Class :public static class ClusterFileTransferException extends Exception | |
Constructor Summary | |
public | ClusterFileTransfer(HAPartition partition, Map destinationDirectoryMap) Constructor needs the cluster partition and the mapping of server folder names to the java.io.File instance
representing the physical folder. |
Method Summary | |
public static boolean | localMove(File source, File destination) | public void | membershipChanged(Vector deadMembers, Vector newMembers, Vector allMembers) Called when a new partition topology occurs. | public void | pull(File file, String parentName) Get specified file from the cluster. | public void | push(File file, String parentName, boolean leaveInTempFolder) Send specified file to cluster. | public FileContentChunk | remotePullOpenFile(File file, String originNodeName, ClusterNode originNode, String parentName) This is remotely called by
ClusterFileTransfer.pull(File,String) to open the file on the machine that
the file is being copied from.
Parameters: file - is the file to pull. Parameters: originNodeName - is the cluster node that is requesting the file. Parameters: parentName - is the parent folder name for the file on both source and destination nodes. | public FileContentChunk | remotePullReadFile(File file, String originNodeName) This is remotely called by
ClusterFileTransfer.pull(File,String) to read the file on the machine that the file is being
copied from.
Parameters: file - is the file to pull. Parameters: originNodeName - is the cluster node that is requesting the file. | public void | remotePushCloseFile(FileContentChunk fileChunk, Boolean leaveInTempFolder, String parentName) Remote method for closing the file just transmitted. | public void | remotePushWriteFile(FileContentChunk fileChunk, String parentName) Remote method for writing file a fragment at a time. |
ClusterFileTransfer | public ClusterFileTransfer(HAPartition partition, Map destinationDirectoryMap)(Code) | | Constructor needs the cluster partition and the mapping of server folder names to the java.io.File instance
representing the physical folder.
Parameters: partition - represents the cluster. Parameters: destinationDirectoryMap - is the mapping between server folder name and physical folder representation. |
membershipChanged | public void membershipChanged(Vector deadMembers, Vector newMembers, Vector allMembers)(Code) | | Called when a new partition topology occurs. see HAPartition.AsynchHAMembershipListener
Parameters: deadMembers - A list of nodes that have died since the previous view Parameters: newMembers - A list of nodes that have joined the partition since the previous view Parameters: allMembers - A list of nodes that built the current view |
pull | public void pull(File file, String parentName) throws ClusterFileTransferException(Code) | | Get specified file from the cluster.
Parameters: file - identifies the file to get from the cluster. Parameters: parentName - is the parent folder name for the file on both source and destination nodes. throws: ClusterFileTransferException - |
push | public void push(File file, String parentName, boolean leaveInTempFolder) throws ClusterFileTransferException(Code) | | Send specified file to cluster.
Parameters: file - is the file to send. Parameters: leaveInTempFolder - is true if the file should be left in the server temp folder. throws: ClusterFileTransferException - |
remotePullOpenFile | public FileContentChunk remotePullOpenFile(File file, String originNodeName, ClusterNode originNode, String parentName)(Code) | | This is remotely called by
ClusterFileTransfer.pull(File,String) to open the file on the machine that
the file is being copied from.
Parameters: file - is the file to pull. Parameters: originNodeName - is the cluster node that is requesting the file. Parameters: parentName - is the parent folder name for the file on both source and destination nodes. FileContentChunk containing the first part of the file read after opening it. |
remotePullReadFile | public FileContentChunk remotePullReadFile(File file, String originNodeName)(Code) | | This is remotely called by
ClusterFileTransfer.pull(File,String) to read the file on the machine that the file is being
copied from.
Parameters: file - is the file to pull. Parameters: originNodeName - is the cluster node that is requesting the file. FileContentChunk containing the next part of the file read. |
remotePushCloseFile | public void remotePushCloseFile(FileContentChunk fileChunk, Boolean leaveInTempFolder, String parentName)(Code) | | Remote method for closing the file just transmitted.
Parameters: fileChunk - Parameters: leaveInTempFolder - is true if we should leave the file in the server temp folder |
remotePushWriteFile | public void remotePushWriteFile(FileContentChunk fileChunk, String parentName)(Code) | | Remote method for writing file a fragment at a time.
Parameters: fileChunk - |
|
|