| 242 | } |
| 243 | |
| 244 | Status ElasticGrpcServer::Join() { |
| 245 | GrpcServer::Join(); |
| 246 | mutex_lock l(mu_); |
| 247 | switch (state_) { |
| 248 | case NEW: |
| 249 | LOG(FATAL) << "Server shoud already closed"; |
| 250 | case STARTED: |
| 251 | case STOPPED: |
| 252 | update_server_thread_.reset(); |
| 253 | return Status::OK(); |
| 254 | default: |
| 255 | LOG(FATAL); |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | /* static */ |
| 260 | Status ElasticGrpcServer::Create(const ServerDef& server_def, Env* env, |