public int parseObject(Object o) throws IOException, InterruptedException
     {
        if(o instanceof Command )
        {
            Command command = (Command)o;
            System.out.println("load balancer thread " + command);    
            System.out.println(LoadBalancer.getNode(command.key));
            
            BaseClient client = new BaseClient();
            client.send(LoadBalancer.getNode(command.key), 
                    "localhost", command.clientPort);
            return 0;
        }
        else if(o instanceof StorageNodeMetadata )
        {
            StorageNodeMetadata metadata = (StorageNodeMetadata)o;
            System.out.println(metadata);
            LoadBalancer.storageNodes.add(metadata);
           
            Thread.sleep(100);
            System.out.println(LoadBalancer.storageNodes);
            for (int i=0; i<LoadBalancer.storageNodes.size(); i++){
                BaseClient client = new BaseClient();
                client.send(LoadBalancer.storageNodes, 
                        "localhost", LoadBalancer.storageNodes.get(i).getPort());
                
            }
            return 0;
        }
        else 
            return 1;
     }