hep.io.root.daemon.xrootd
Class Session
java.lang.Object
hep.io.root.daemon.xrootd.Session
public class Session
- extends Object
A session allows for all supported xrootd commands to be send. All the
methods of this class are synchronous, i.e. they wait until the data is
available before they return.
- Author:
- tonyj
Method Summary |
void |
close()
|
void |
close(OpenFile file)
|
List<String> |
dirList(String path)
|
String[] |
locate(String path,
boolean noWait,
boolean refresh)
|
OpenFile |
open(String path,
int mode,
int options)
|
void |
ping()
|
String |
prepare(String[] path,
int options,
int priority)
|
String |
protocol()
|
String |
query(int queryType,
String path)
|
int |
read(OpenFile file,
long fileOffset,
byte[] buffer)
|
int |
read(OpenFile file,
long fileOffset,
byte[] buffer,
int bufOffset,
int size)
|
void |
remove(String path)
|
|
send(Operation<V> operation)
This method allows asynchronous execution of an operation. |
FileStatus |
stat(String path)
|
String |
toString()
|
void |
write(OpenFile file,
long fileOffset,
byte[] buffer,
int offset,
int length)
|
Session
public Session(String host,
int port,
String userName)
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Throws:
IOException
send
public <V> FutureResponse<V> send(Operation<V> operation)
- This method allows asynchronous execution of an operation.
- Parameters:
operation
- The operation to be performed
- Returns:
- A future which will contain the response
dirList
public List<String> dirList(String path)
throws IOException
- Throws:
IOException
ping
public void ping()
throws IOException
- Throws:
IOException
remove
public void remove(String path)
throws IOException
- Throws:
IOException
stat
public FileStatus stat(String path)
throws IOException
- Throws:
IOException
query
public String query(int queryType,
String path)
throws IOException
- Throws:
IOException
prepare
public String prepare(String[] path,
int options,
int priority)
throws IOException
- Throws:
IOException
locate
public String[] locate(String path,
boolean noWait,
boolean refresh)
throws IOException
- Throws:
IOException
protocol
public String protocol()
throws IOException
- Throws:
IOException
open
public OpenFile open(String path,
int mode,
int options)
throws IOException
- Throws:
IOException
close
public void close(OpenFile file)
throws IOException
- Throws:
IOException
read
public int read(OpenFile file,
long fileOffset,
byte[] buffer)
throws IOException
- Throws:
IOException
read
public int read(OpenFile file,
long fileOffset,
byte[] buffer,
int bufOffset,
int size)
throws IOException
- Throws:
IOException
write
public void write(OpenFile file,
long fileOffset,
byte[] buffer,
int offset,
int length)
throws IOException
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2000-2013 FreeHEP. All Rights Reserved.