Package org.apache.derby.iapi.services.monitor

Examples of org.apache.derby.iapi.services.monitor.PersistentService


    UUIDFactory uf = Monitor.getMonitor().getUUIDFactory();

    identifier = uf.createUUID();

        PersistentService ps = Monitor.getMonitor().getServiceType(this);

        try
        {
            storageFactory =
            ps.getStorageFactoryInstance(
                true,
                dataDirectory,
                startParams.getProperty(
                    Property.STORAGE_TEMP_DIRECTORY,
                    PropertyUtil.getSystemProperty(
View Full Code Here


  private boolean handleServiceType(
    String      type)
    {
        try
        {
            PersistentService ps =
                Monitor.getMonitor().getServiceProvider(type);
            return ps != null && ps.hasStorageFactory();
        }
        catch (StandardException se)
        {
            return false;
        }
View Full Code Here

        LogFactory logFactory =(LogFactory) Monitor.findServiceModule(this, rawstore.getLogFactoryModule());
        logFactory.createDataWarningFile();

        //creating readme in root database directory
        DataFactory dataFactory =(DataFactory) Monitor.findServiceModule(this, rawstore.getDataFactoryModule());
        PersistentService ps = Monitor.getMonitor().getServiceType(rawstore);
        ps.createDataWarningFile(dataFactory.getStorageFactory());
    }
View Full Code Here

    public  String  getCanonicalServiceName( String userSpecifiedName )
        throws StandardException
    {
        if ( userSpecifiedName == null ) { return null; }
       
        PersistentService   correspondingService = findProviderForCreateuserSpecifiedName );

        if ( correspondingService == null ) { return null; }
        else { return correspondingService.getCanonicalServiceName( userSpecifiedName ); }
    }
View Full Code Here

    TopService ts = findTopService(serviceModule);

    if (ts == null)
      return null;

    PersistentService provider = ts.getServiceType();
    if (provider == null)
      return null;

    String serviceName = ts.getKey().getIdentifier();

    Properties properties = provider.getServiceProperties(serviceName, (Properties) null);

    properties = new UpdateServiceProperties(provider, serviceName, properties, true);

    return setLocale(properties, userDefinedLocale);
View Full Code Here

  public Object createPersistentService(String factoryInterface, String name, Properties properties)
    throws StandardException {


    PersistentService provider = findProviderForCreate(name);
    if (provider == null) {
      throw StandardException.newException(SQLState.PROTOCOL_UNKNOWN, name);
    }

    return bootService(provider, factoryInterface, name, properties, true);
View Full Code Here

      
    */
    public void removePersistentService(String name)
         throws StandardException
    {
        PersistentService provider=null;
    provider = findProviderForCreate(name);
        String serviceName = provider.getCanonicalServiceName(name);
        boolean removed = provider.removeServiceRoot(serviceName);
        if (removed == false)
      throw StandardException.newException(SQLState.SERVICE_DIRECTORY_REMOVE_ERROR,serviceName);
    }
View Full Code Here

    private boolean getPersistentServiceImplementation( Class<?> possibleModule)
    {
        if( ! PersistentService.class.isAssignableFrom(possibleModule))
            return false;

        PersistentService ps = (PersistentService) newInstance(possibleModule);
        if (ps == null) {
            report("Class " + possibleModule.getName() + " cannot create instance, module ignored.");
        } else {
            serviceProviders.put(ps.getType(), ps);
        }
        return true;
    } // end of getPersistentServiceImplementation
View Full Code Here

  */
  private void determineSupportedServiceProviders() {

    for (Iterator<PersistentService> i = serviceProviders.values().iterator(); i.hasNext(); ) {

      PersistentService provider = i.next();

      // see if this provider can live in this environment
      if (!BaseMonitor.canSupport(provider, (Properties) null)) {
        i.remove();
        continue;
View Full Code Here

    to boot all the services that that provider knows about.
  */
  private void bootPersistentServices() {
    Enumeration e = new ProviderEnumeration( applicationProperties);
    while (e.hasMoreElements()) {
      PersistentService provider = (PersistentService) e.nextElement();
      bootProviderServices(provider);
    }

  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.services.monitor.PersistentService

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.