|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.ha.framework.server.ClusterFileTransfer
public class ClusterFileTransfer
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).
| Nested Class Summary | |
|---|---|
static class |
ClusterFileTransfer.ClusterFileTransferException
Exception wrapper class |
| Constructor Summary | |
|---|---|
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 | |
|---|---|
static boolean |
localMove(File source,
File destination)
|
void |
membershipChanged(Vector deadMembers,
Vector newMembers,
Vector allMembers)
Called when a new partition topology occurs. |
void |
pull(File file,
String parentName)
Get specified file from the cluster. |
void |
push(File file,
String parentName,
boolean leaveInTempFolder)
Send specified file to cluster. |
org.jboss.ha.framework.server.ClusterFileTransfer.FileContentChunk |
remotePullOpenFile(File file,
String originNodeName,
ClusterNode originNode,
String parentName)
This is remotely called by pull(File , String ) to open the file on the machine that
the file is being copied from. |
org.jboss.ha.framework.server.ClusterFileTransfer.FileContentChunk |
remotePullReadFile(File file,
String originNodeName)
This is remotely called by pull(File, String ) to read the file on the machine that the file is being
copied from. |
void |
remotePushCloseFile(org.jboss.ha.framework.server.ClusterFileTransfer.FileContentChunk fileChunk,
Boolean leaveInTempFolder,
String parentName)
Remote method for closing the file just transmitted. |
void |
remotePushWriteFile(org.jboss.ha.framework.server.ClusterFileTransfer.FileContentChunk fileChunk,
String parentName)
Remote method for writing file a fragment at a time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClusterFileTransfer(HAPartition partition,
Map destinationDirectoryMap)
partition - represents the cluster.destinationDirectoryMap - is the mapping between server folder name and physical folder representation.| Method Detail |
|---|
public void pull(File file,
String parentName)
throws ClusterFileTransfer.ClusterFileTransferException
file - identifies the file to get from the cluster.parentName - is the parent folder name for the file on both source and destination nodes.
ClusterFileTransfer.ClusterFileTransferException
public org.jboss.ha.framework.server.ClusterFileTransfer.FileContentChunk remotePullOpenFile(File file,
String originNodeName,
ClusterNode originNode,
String parentName)
pull(File , String ) to open the file on the machine that
the file is being copied from.
file - is the file to pull.originNodeName - is the cluster node that is requesting the file.parentName - is the parent folder name for the file on both source and destination nodes.
public org.jboss.ha.framework.server.ClusterFileTransfer.FileContentChunk remotePullReadFile(File file,
String originNodeName)
pull(File, String ) to read the file on the machine that the file is being
copied from.
file - is the file to pull.originNodeName - is the cluster node that is requesting the file.
public void push(File file,
String parentName,
boolean leaveInTempFolder)
throws ClusterFileTransfer.ClusterFileTransferException
file - is the file to send.leaveInTempFolder - is true if the file should be left in the server temp folder.
ClusterFileTransfer.ClusterFileTransferException
public void remotePushWriteFile(org.jboss.ha.framework.server.ClusterFileTransfer.FileContentChunk fileChunk,
String parentName)
fileChunk -
public void remotePushCloseFile(org.jboss.ha.framework.server.ClusterFileTransfer.FileContentChunk fileChunk,
Boolean leaveInTempFolder,
String parentName)
fileChunk - leaveInTempFolder - is true if we should leave the file in the server temp folder
public void membershipChanged(Vector deadMembers,
Vector newMembers,
Vector allMembers)
membershipChanged in interface HAPartition.HAMembershipListenerdeadMembers - A list of nodes that have died since the previous viewnewMembers - A list of nodes that have joined the partition since the previous viewallMembers - A list of nodes that built the current view
public static boolean localMove(File source,
File destination)
throws FileNotFoundException,
IOException
FileNotFoundException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||