tachyon
Class WorkerClient

java.lang.Object
  extended by tachyon.WorkerClient

public class WorkerClient
extends Object

The client talks to a worker server. It keeps sending keep alive message to the worker server. Since WorkerService.Client is not thread safe, this class has to guarantee thread safe.


Constructor Summary
WorkerClient(InetSocketAddress address)
           
 
Method Summary
 void accessFile(int fileId)
           
 void addCheckpoint(long userId, int fileId)
           
 void cacheFile(long userId, int fileId)
           
 void close()
           
 String getDataFolder()
           
 String getUserTempFolder(long userId)
           
 String getUserUnderfsTempFolder(long userId)
           
 boolean isConnected()
           
 void lockFile(int fileId, long userId)
           
 boolean open()
           
 boolean requestSpace(long userId, long requestBytes)
           
 void returnSpace(long userId, long returnSpaceBytes)
           
 void unlockFile(int fileId, long userId)
           
 void userHeartbeat(long userId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkerClient

public WorkerClient(InetSocketAddress address)
Method Detail

accessFile

public void accessFile(int fileId)
                throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException

addCheckpoint

public void addCheckpoint(long userId,
                          int fileId)
                   throws FileDoesNotExistException,
                          SuspectedFileSizeException,
                          FailedToCheckpointException,
                          org.apache.thrift.TException
Throws:
FileDoesNotExistException
SuspectedFileSizeException
FailedToCheckpointException
org.apache.thrift.TException

cacheFile

public void cacheFile(long userId,
                      int fileId)
               throws FileDoesNotExistException,
                      SuspectedFileSizeException,
                      org.apache.thrift.TException
Throws:
FileDoesNotExistException
SuspectedFileSizeException
org.apache.thrift.TException

close

public void close()

getUserTempFolder

public String getUserTempFolder(long userId)
                         throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException

getUserUnderfsTempFolder

public String getUserUnderfsTempFolder(long userId)
                                throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException

getDataFolder

public String getDataFolder()
                     throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException

lockFile

public void lockFile(int fileId,
                     long userId)
              throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException

isConnected

public boolean isConnected()

open

public boolean open()

requestSpace

public boolean requestSpace(long userId,
                            long requestBytes)
                     throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException

returnSpace

public void returnSpace(long userId,
                        long returnSpaceBytes)
                 throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException

unlockFile

public void unlockFile(int fileId,
                       long userId)
                throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException

userHeartbeat

public void userHeartbeat(long userId)
                   throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException


Copyright © 2013. All Rights Reserved.