Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.persistence
Interface IRSEPersistenceManager


public interface IRSEPersistenceManager

This interface defines the services provided by a persistence manager for RSE. There is typically only one persistence manager instance defined when RSE is running. The persistence manager controls the persistence of RSE profiles through the use of registered persistence providers.


Method Summary
 boolean commitProfile ( ISystemProfile profile, long timeout)
          Schedules a save of particular profile.
  ISystemProfile[] commitProfiles (long timeout)
          Save all profiles.
 void deleteProfile ( IRSEPersistenceProvider persistenceProvider, String profileName)
          Delete the persistent form of a profile.
  IRSEPersistenceProvider getPersistenceProvider ( String id)
          Retrieves the persistence provider named by a particular id.
  String[] getPersistenceProviderIds ()
           
 boolean isBusy ()
           
 boolean isRestoreComplete ()
          Indicate if all profiles for all autostart persistence provider have been restored.
 void migrateProfile ( ISystemProfile profile, IRSEPersistenceProvider persistenceProvider)
          Migrates a profile to a new persistence provider.
  IStatus migrateProfile ( ISystemProfile profile, IRSEPersistenceProvider persistenceProvider, boolean delete)
          Migrates a profile to a new persistence provider.
 void registerPersistenceProvider ( String id, IRSEPersistenceProvider provider)
          Register the persistence provider to be used when saving and restoring RSE doms.
  ISystemProfile[] restoreProfiles ( IRSEPersistenceProvider provider, long timeout)
          Restore the profiles for a particular provider.
  ISystemProfile[] restoreProfiles (long timeout)
          Restore all profiles known to autostart persistence providers.
 

Method Detail

commitProfile

boolean commitProfile(
ISystemProfile profile,
                      long timeout)
Schedules a save of particular profile. If the profile has an existing persistence provider it is saved by that persistence provider. If the profile has no persistence provider then the default persistence provider is used. If the persistence manager is in a state where it is saving or restoring another profile on another thread this call will block for the timeout value specified. If the timeout expires this call will return false.

Parameters:
profile - the profile to save
timeout - the timeout value in milliseconds. If the operation cannot be started in this time it will return false.
Returns:
true if the save was scheduled and false if the timeout expired without scheduling the save.

commitProfiles


ISystemProfile[] commitProfiles(long timeout)
Save all profiles. Will attempt to schedule a save of all profiles. Each attempt will time out after the number of milliseconds specified if the operation cannot be started.

Parameters:
timeout - the maximum number of milliseconds to wait until the persistence manager becomes available to schedule a save for an individual profile.
Returns:
the list of profiles that could not be scheduled for save.

restoreProfiles


ISystemProfile[] restoreProfiles(long timeout)
Restore all profiles known to autostart persistence providers.

Parameters:
timeout - the maximum number of milliseconds to wait for the manager to become idle for each profile.
Returns:
an array of restored profiles.

restoreProfiles


ISystemProfile[] restoreProfiles(
IRSEPersistenceProvider provider,
                                 long timeout)
Restore the profiles for a particular provider.

Parameters:
provider - a persistence provider
timeout - the maximum number of milliseconds to wait for the manager to become idle before restoring this the each profile managed by this provider.
Returns:
an array of the restored profiles.

deleteProfile

void deleteProfile(
IRSEPersistenceProvider persistenceProvider,
                   
String profileName)
Delete the persistent form of a profile.

Parameters:
persistenceProvider - the persistence provider to use to delete the profile. If this is null the default persistence provider is used.
profileName - The name of the profile to delete

migrateProfile

void migrateProfile(
ISystemProfile profile,
                    
IRSEPersistenceProvider persistenceProvider)
Migrates a profile to a new persistence provider. It will delete the persistent form known to its previous persistence provider. If the new provider and the previous provider are the same this does nothing. Exactly the same as migrateProfile(profile, persistenceProvider, true);

Parameters:
profile - the system profile to be migrated
persistenceProvider - the persistence provider to which this profile will be migrated.

migrateProfile


IStatus migrateProfile(
ISystemProfile profile,
                       
IRSEPersistenceProvider persistenceProvider,
                       boolean delete)
Migrates a profile to a new persistence provider. It will mark the persistent form known to its previous persistence provider as migrated. This may, in fact, result in the persistent form of this profile being deleted. If the new provider and the previous provider are the same this does nothing.

Parameters:
profile - the system profile to be migrated
persistenceProvider - the persistence provider to which this profile will be migrated.
delete - true if the persistent form of this profile is to be deleted from the old provider, false if the persistent form of the profile is to be marked as migrated.
Returns:
an IStatus indicating the success of the migration.
Since:
org.eclipse.rse.core 3.0

registerPersistenceProvider

void registerPersistenceProvider(
String id,
                                 
IRSEPersistenceProvider provider)
Register the persistence provider to be used when saving and restoring RSE doms. The provider is registered under the provided id. If the id has already been registered, this provider replaces the previous provider with that id.

Parameters:
id - the provider id.
provider - the provider.

getPersistenceProviderIds


String[] getPersistenceProviderIds()
Returns:
an array of persistence provider ids known to this workbench. These may have been provided by extension point or by registering them using registerPersistenceProvider(String, IRSEPersistenceProvider)

getPersistenceProvider


IRSEPersistenceProvider getPersistenceProvider(
String id)
Retrieves the persistence provider named by a particular id. It can return null if there is no provider known by that id. This may have the effect of activating the plugin that contains this provider.

Parameters:
id - the id of the persistence provider to locate
Returns:
the persistence provider or null

isBusy

boolean isBusy()
Returns:
true if this instance of the persistence manager is currently saving or restoring a profile.

isRestoreComplete

boolean isRestoreComplete()
Indicate if all profiles for all autostart persistence provider have been restored. These profiles are restored when RSE is activated and when profiles are reloaded by the user. This can be used from a different thread than the one that requested the restore.

Returns:
true if the profiles have been fully restored

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire