Package org.apache.derby.iapi.store.access

Examples of org.apache.derby.iapi.store.access.AccessFactory


     *
   * @exception  T_Fail  Throws T_Fail on any test failure.
     **/
  protected void runTestSet() throws T_Fail
  {
    AccessFactory store = null;
    TransactionController tc = null;
    boolean pass = false;

        out.println("executing b2i test");

        store = (AccessFactory) store_module;

    if (store == null)
        {
      throw T_Fail.testFailMsg(
                    getModuleToTestProtocolName() + " service not started.");
    }

    ContextManager cm1 = contextService.newContextManager();
    contextService.setCurrentContextManager(cm1);

    REPORT("(unitTestMain) Testing " + testService);

    try {

      tc = store.getTransaction(cm1);

        pass = true;

            if (
                t_005(tc)   &&
View Full Code Here


      if (corrupt != null)
        return Serviceable.DONE; // don't do this again.
    }

    // check to see if checkpointInterval and logSwitchInterval has changed
    AccessFactory af =
            (AccessFactory)Monitor.getServiceModule(this, AccessFactory.MODULE);

    try
    {
      if (af != null)
      {
        TransactionController tc = null;
        try
        {
          tc = af.getAndNameTransaction(
                            context, AccessFactoryGlobals.SYS_TRANS_NAME);

          getLogFactoryProperties(tc);
        }
        finally
View Full Code Here

    //if the log archive mode is already enabled; thre is nothing to do
    if(!logArchived)
    {
      logArchived = true;
      AccessFactory af =
            (AccessFactory)Monitor.getServiceModule(this, AccessFactory.MODULE);

      if (af != null)
      {
        TransactionController tc = null;
        tc = af.getTransaction(
                        ContextService.getFactory().getCurrentContextManager());
        tc.setProperty(Property.LOG_ARCHIVE_MODE , "true", true);
      }
    }
  }
View Full Code Here

  }

  // disable the log archive mode
  public void disableLogArchiveMode() throws StandardException
  {
    AccessFactory af =
            (AccessFactory)Monitor.getServiceModule(this, AccessFactory.MODULE);
    if (af != null)
    {
      TransactionController tc = null;
      tc = af.getTransaction(ContextService.getFactory().getCurrentContextManager());
      tc.setProperty(Property.LOG_ARCHIVE_MODE , "false", true);
    }
        logArchived = false;
  }
View Full Code Here

     **/
    public static String diag_conglomid(String db_name, long conglomid)
        throws StandardException
    {
        String          ret_string   = null;
        AccessFactory   store_module = null;

        store_module = (AccessFactory) getModuleFromDbName(db_name);

        if (store_module != null)
        {

            TransactionController tc =
                store_module.getTransaction(
                    ContextService.getFactory().getCurrentContextManager());

            ConglomerateController open_table =
                tc.openConglomerate(
                    conglomid, false, 0, TransactionController.MODE_TABLE,
View Full Code Here

    public static long diag_containerid_to_conglomid(
    Object   module,
    long            containerid)
    {
        String          ret_string   = null;
        AccessFactory   store_module = null;
        long            conglom_id   = Long.MIN_VALUE;

        // Find the AccessFactory
        store_module = (AccessFactory)
            Monitor.getServiceModule(module, AccessFactory.MODULE);

        if (store_module != null)
        {
            try
            {
                TransactionController tc =
                    store_module.getTransaction(
                        ContextService.getFactory().getCurrentContextManager());

                conglom_id = tc.findConglomid(containerid);
            }
            catch (Throwable t)
View Full Code Here

    public static long diag_conglomid_to_containerid(
    Object   module,
    long            conglomid)
    {
        String          ret_string   = null;
        AccessFactory   store_module = null;
        long            container_id = Long.MIN_VALUE;

        // Find the AccessFactory
        store_module = (AccessFactory)
            Monitor.getServiceModule(module, AccessFactory.MODULE);

        if (store_module != null)
        {
            try
            {
                TransactionController tc =
                    store_module.getTransaction(
                        ContextService.getFactory().getCurrentContextManager());

                container_id = tc.findContainerid(conglomid);
            }
            catch (Throwable t)
View Full Code Here

      // The user is trying to change the secret key.
      // The secret key is never stored in clear text, but we
      // store the encrypted form in the services.properties
      // file.  Swap the secret key with the encrypted form and
      // put that in the services.properties file.
      AccessFactory af = ((TransactionManager)tc).getAccessManager();

      RawStoreFactory rsf = (RawStoreFactory)
        Monitor.findServiceModule(af, RawStoreFactory.MODULE);

      // remove secret key from properties list if possible
View Full Code Here

   */
  private void createInfoFromProp(Properties createArgs)
     throws StandardException
  {
    // Need a TransactionController to get database/service wide properties.
    AccessFactory af = (AccessFactory)
      Monitor.getServiceModule(dataFactory, AccessFactory.MODULE);

    // RESOLVE: sku defectid 2014
    TransactionController tc =
            (af == null) ?
                null :
                af.getTransaction(
                        ContextService.getFactory().getCurrentContextManager());

    pageSize =
      PropertyUtil.getServiceInt(tc, createArgs,
        Property.PAGE_SIZE_PARAMETER, 
View Full Code Here

     **/
    public void getContainerProperties(Properties prop)
        throws StandardException
    {

    AccessFactory af = (AccessFactory)
      Monitor.getServiceModule(dataFactory, AccessFactory.MODULE);

    TransactionController tc =
            (af == null) ?
                null :
                af.getTransaction(
                    ContextService.getFactory().getCurrentContextManager());

    bufferSize =
      PropertyUtil.getServiceInt(tc, prop,
        RawStoreFactory.STREAM_FILE_BUFFER_SIZE_PARAMETER, 
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.store.access.AccessFactory

Copyright © 2018 www.massapicom. 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.