예제 #1
0
 def __init__(self):
     """
     Constructor
     """
     DatabaseClient.__init__(self)
     self.conn = None
     self.lock = threading.Lock()
예제 #2
0
 def __init__(self):
     """
     Constructor
     """
     DatabaseClient.__init__(self)
     self.context = zmq.Context()
     self.conn = self.context.socket(zmq.PUB)
     self.lock = threading.Lock()
예제 #3
0
 def __init__(self, logger):
     """
     Constructor
     """
     DatabaseClient.__init__(self)
     self.conn = None
     self.cursor = None
     self.lock = threading.Lock()
     self.logger = logger
예제 #4
0
    def __init__(self, dir=os.getcwd()):
        """
        Constructor
        """
        DatabaseClient.__init__(self)
        self.lock = threading.Lock()
        self.file_mapping = dict()

        if dir is None or dir == '':
            raise Exception("FileClient does not accept empty directory.")

        self.file_directory = dir