@Override
  public synchronized void shutdown() throws TitanException {
    if (!isOpen) return;
    super.shutdown();
    etManager.close();
    idAssigner.close();

    try {
      edgeStore.close();
      propertyIndex.close();
      storage.close();
    } catch (StorageException e) {
      throw new TitanException("Could not close storage backend", e);
    }
    isOpen = false;
  }
  public StandardTitanGraph(GraphDatabaseConfiguration configuration) {
    this.config = configuration;
    this.storage = configuration.getStorageManager();
    this.edgeStore = configuration.getEdgeStore(this.storage);
    this.propertyIndex = configuration.getPropertyIndex(this.storage);
    this.bufferMutations = configuration.hasBufferMutations();
    this.bufferSize = configuration.getBufferSize();
    Preconditions.checkArgument(bufferSize > 0);
    this.maxWriteRetryAttempts = config.getWriteAttempts();
    this.maxReadRetryAttempts = config.getReadAttempts();
    this.retryStorageWaitTime = config.getStorageWaittime();

    this.idAssigner = config.getIDAssigner(this.storage);
    this.idManager = idAssigner.getIDManager();

    this.serializer = config.getSerializer();
    this.etManager = new SimpleTypeManager(this);
    isOpen = true;
  }
 @Override
 public void assignID(InternalTitanVertex vertex) {
   assert !vertex.hasID();
   vertex.setID(idAssigner.getNewID(vertex));
 }