Examples of Ndb


Examples of com.mysql.cluster.ndbj.Ndb

        }
    }

    public Db createDb(String database, int maxTransactions) {
        try {
            Ndb ndb = clusterConnection.createNdb(database, maxTransactions);
            return new DbImpl(ndb);
        } catch (NdbApiException ndbApiException) {
            throw new ClusterJDatastoreException(local.message("ERR_Datastore"),
                    ndbApiException);
        }
View Full Code Here

Examples of com.mysql.cluster.ndbj.Ndb

   * @return The number of rows in the database.
   * @throws NdbApiException If an error occurs in the database.
   */
  public long getRecordCount() throws NdbApiException
  {
    Ndb ndb = entryContainer.getRootContainer().getNDB();

    try {
      return ndb.selectCount(name);
    } finally {
      if (ndb != null) {
        entryContainer.getRootContainer().releaseNDB(ndb);
      }
    }
View Full Code Here

Examples of com.mysql.cluster.ndbj.Ndb

    }

    // Get NDB objects.
    int connsIndex = 0;
    for (int i = 0; i < this.ndbThreadCount; i++) {
      Ndb ndb = ndbConns[connsIndex].createNdb(
        BackendImpl.DATABASE_NAME, 1024);
      connsIndex++;
      if (connsIndex >= this.ndbNumConnections) {
        connsIndex = 0;
      }
      try {
        this.ndbQueue.put(ndb);
      } catch (Exception e) {
        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }
        if (ndb != null) {
          ndb.close();
        }
      }
    }

    openAndRegisterEntryContainers(config.getBaseDN());
View Full Code Here

Examples of com.mysql.cluster.ndbj.Ndb

        ec.exclusiveLock.unlock();
      }
    }

    while (!this.ndbQueue.isEmpty()) {
      Ndb ndb = null;
      try {
        ndb = this.ndbQueue.poll();
        if (ndb != null) {
          ndb.close();
        }
      } catch (Exception e) {
        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
View Full Code Here

Examples of com.mysql.ndbjtie.ndbapi.Ndb

        handleError(returnCode, clusterConnection, connectString, nodeId);
    }

    public Db createDb(String database, int maxTransactions) {
        checkConnection();
        Ndb ndb = null;
        // synchronize because create is not guaranteed thread-safe
        synchronized(this) {
            ndb = Ndb.create(clusterConnection, database, "def");
            handleError(ndb, clusterConnection, connectString, nodeId);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.