public abstract class MPropertiesRegistry
extends java.lang.Object
MProperties
instance and access each
instance as needed through the MPropertiesRegistry
for the application.
Upon startup, MApp
creates one MPropertiesRegistry
and associates with it
the MProperties
instance that encapsulates the location specified by setting
the repoURL
and configURL
in
MAppProperties
(or via the corresponding
command-line argument upon start-up).
Applications can add other MProperties
instances by calling
newSettableProperties(String)
or
newProperties(String)
.
The MProperties
instances correspond to other repository
locations with additional configuration and metadata information.
Modifier and Type | Field and Description |
---|---|
protected boolean |
optimizeIt |
protected MPropertiesRegistry |
reg |
Constructor and Description |
---|
MPropertiesRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
abstract void |
commit()
Commit all information encapsulated by this
MPropropertiesRegistry
instance, that is, all the information currently encapsulated by all
MProperties instances that are in this registry is updated. |
void |
createDefaultRegistry(java.lang.String url)
Factory method to create a properties registry based on url
and set the created registry to be the default registry
|
MPropertiesRegistry |
createRegistry(java.lang.String url)
Factory method to create a properties registry based on url, and returns it
|
abstract void |
destroy()
Perform clean up of the registry
|
MPropertiesRegistry |
getDefaultRegistry()
Retrieve the current default
MPropertiesRegistry . |
abstract int |
getOperationTimeout()
Get the current timeout value (in milliseconds) to server connection
|
abstract MProperties |
newProperties(java.lang.String url)
Create a new readonly
MProperties based on url, without link chasing. |
abstract MProperties |
newProperties(java.lang.String url,
boolean chaseRef)
Create a new readonly
MProperties based on url, with optional link chasing. |
abstract MProperties |
newSettableProperties(java.lang.String url)
Create a new
MProperties instance that can then be accessed via this
MPropertiesRegistry . |
abstract MProperties |
newSettableProperties(java.lang.String url,
boolean chaseRef)
Create a new
MProperties instance that can then be accessed via this
MPropertiesRegistry . |
abstract void |
removeProperties(java.lang.String url)
Delete the node in the TIBCO Repository that is at the URL passed in as an argument.
|
abstract void |
rollback()
Undo the last
commit() operation. |
void |
setDefaultRegistry(MPropertiesRegistry reg)
Set the default MPropertiesRegistry, can only be set once
|
void |
setFetchFast() |
abstract void |
setOperationTimeout(int milliSecs)
Set the timeout value (in milliseconds) to server connection
|
protected boolean optimizeIt
protected MPropertiesRegistry reg
public void setFetchFast()
public abstract void commit() throws MException
MPropropertiesRegistry
instance, that is, all the information currently encapsulated by all
MProperties
instances that are in this registry is updated.
Commit and rollback operations are always performed on a per registry basis,
where changes from all MProperties
instances associated with a
registry are committed or rolled back together.
MException
- if the repository instance associated with this MPropropertiesRegistry
is not available for some reason.rollback()
public void createDefaultRegistry(java.lang.String url) throws MException
MException
public MPropertiesRegistry createRegistry(java.lang.String url) throws MException
MException
public abstract void destroy()
public MPropertiesRegistry getDefaultRegistry()
MPropertiesRegistry
. The SDK creates
only one registry. You call this method for access to it.public abstract int getOperationTimeout() throws MException
MException
public abstract MProperties newProperties(java.lang.String url) throws MException
MProperties
based on url, without link chasing.
The new MProperties
instance can be accessed via this MPropertiesRegistry
.
If you call this method to create an MProperties
instance,
you cannot make changes to the MProperties
instance.
url
- URL for the adapter instance description object that stores the
information encapsulated by this MProperties
.MException
newSettableProperties(String)
public abstract MProperties newProperties(java.lang.String url, boolean chaseRef) throws MException
MProperties
based on url, with optional link chasing.
The new MProperties
instance can be accessed via this MPropertiesRegistry
.
If you call this method to create an MProperties
instance,
you cannot make changes to the MProperties
instance.
url
- URL for the adapter instance description object that stores the
information encapsulated by this MProperties
.chaseRef
- If the value of this parameter is true, the system
follows all pointers from association list values to TIBCO Repository objects
and uploads the information in each object into the repository.
If false, links are not followed.MException
newSettableProperties(String)
public abstract MProperties newSettableProperties(java.lang.String url) throws MException
MProperties
instance that can then be accessed via this
MPropertiesRegistry
.
If you use newSettableProperties
to create the MProperties
instance, you can then change information in the MProperties
instance and
commit the change to the repository.
Applications usually change properties using the TIBCO Designer software, not the SDK.
Use this method only if you must make changes to TIBCO Repository using the api. Otherwise,
use newProperties(String)
.url
- The URL for the adapter instance description object that stores the
information. The url parameter must refer to a TIBCO Repository object node.MException
newProperties(String)
public abstract MProperties newSettableProperties(java.lang.String url, boolean chaseRef) throws MException
MProperties
instance that can then be accessed via this
MPropertiesRegistry
.url
- The URL for the adapter instance description object that stores the
information. The url parameter must refer to a TIBCO Repository object node.chaseRef
- If the value of this parameter is true, the system follows all
pointers from association list values to TIBCO Repository objects and uploads
the information in each object into the repository. If false, links are not followed.
Note: For Repository 3.0 based MProperties
, url must
refer to an object node, and there is no link chasing.
MException
newProperties(String)
public abstract void removeProperties(java.lang.String url) throws MException
You can only perform this action if the associated MProperties
is not currently locked.
MException
public abstract void rollback() throws MException
commit()
operation.
Assume you made changes to the repository adapter instance description object by
changing information in one or more corresponding MProperties instance. Then,
you called commit()
for the associated registry. You can then call this method
to undo the changes.
Commit and rollback operations are always performed on a per registry basis,
where changes from all MProperties
instances associated with a registry are
committed or rolled back together.
MException
commit()
public void setDefaultRegistry(MPropertiesRegistry reg) throws MException
MException
public abstract void setOperationTimeout(int milliSecs) throws MException
MException
public void clear()