|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geodatabasedistributed.ReplicationAgent
public class ReplicationAgent
A class used to perform replica operations.
The ReplicatonAgent coClass is a software component that can be used to implement replication commands and agents (services). The fundamental unit of replication is a replica pair consisting of a parent replica and a child replica. A ReplicationAgent works with a pair of GeoDataServers. It can be used to create and synchronize replicas within the two GeoDataServers. The ReplicaAgrent also allows you to perform data extration.
If both GeoDataServers are can't be accessed on the same network they are considered disconnected. In this environment, you can perform replication operations by exporting, transporting and importing files. The GeoDataServer class has methods to support these operations.
Constructor Summary | |
---|---|
ReplicationAgent()
Constructs a ReplicationAgent using ArcGIS Engine. |
|
ReplicationAgent(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. ReplicationAgent theReplicationAgent = (ReplicationAgent) obj; |
Method Summary | |
---|---|
void |
addIFeatureProgressListener(IFeatureProgress theListener)
addIFeatureProgressListener. |
void |
createReplica(String versionName,
IGeoDataServer srcGDS,
IGeoDataServer destGDS,
String replicaName,
IGPReplicaDescription desc,
IGPReplicaOptions repOptions)
Creates a replica pair in the workspaces bound to the input geodataservers. |
void |
createReplica2(String versionName,
IGeoDataServer srcGDS,
IGeoDataServer destGDS,
String replicaName,
IGPReplicaDescription desc,
IGPReplicaOptions repOptions,
String layersFolder)
Creates a replica pair and optionally layers in the workspaces bound to the input geodataservers. |
boolean |
equals(Object o)
Compare this object with another |
void |
extractData(String versionName,
IGeoDataServer srcGDS,
IGeoDataServer destGDS,
IGPReplicaDescription desc)
Extracts data from the source geodata server into the destination geodata server. |
static String |
getClsid()
getClsid. |
int |
hashCode()
the hashcode for this object |
void |
removeIFeatureProgressListener(IFeatureProgress theListener)
removeIFeatureProgressListener. |
void |
setCancelTrackerByRef(ITrackCancel rhs1)
The cancel tracker to inspect for user cancellations. |
boolean |
synchronizeReplica(IGeoDataServer gds1,
IGeoDataServer gds2,
IGPReplica rep1,
IGPReplica rep2,
int pol,
int dir,
boolean columnLevel)
Synchronizes a replica pair. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public ReplicationAgent() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic ReplicationAgent(Object obj) throws IOException
ReplicationAgent theReplicationAgent = (ReplicationAgent) obj;
obj
to ReplicationAgent
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void addIFeatureProgressListener(IFeatureProgress theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.geodatabase.IFeatureProgress interface.
IOException
- If there are communications problems.public void removeIFeatureProgressListener(IFeatureProgress theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.geodatabase.IFeatureProgress interface.
IOException
- If there are communications problems.public void createReplica(String versionName, IGeoDataServer srcGDS, IGeoDataServer destGDS, String replicaName, IGPReplicaDescription desc, IGPReplicaOptions repOptions) throws IOException, AutomationException
The IReplicationAgent::CreateReplica method is used to create replicas in a connected environment. This method may be used to create check-out replicas, two way replicas, or one way replicas. To create replicas in a disconnected environement please see the IGeodataserver::CreateReplica method for more information
This method requires two input geodataserver objects,a srcGDS and a destGDS. The replicas will be created in the geodatabases represented by the input geodataserver objects. The srcGDS will host the parent replica, and the destGDS will host the child replica in the replica pair. See the GeoDataServer2 coclass for more information. The ReplicaName is a string that uniquely identifies the replica.
The versionName is the version on the geodatabase represented by the srcGDS from which the replica will be created.
The desc parameter defines the data which will be replicated. See the GPReplicaDescription coclass for more information.
The repOptions parameter defines replica options such as the replica access type. See the GPReplicaOptions coclass for more information.
createReplica
in interface IReplicationAgent
versionName
- The versionName (in)srcGDS
- A reference to a com.esri.arcgis.geodatabasedistributed.IGeoDataServer (in)destGDS
- A reference to a com.esri.arcgis.geodatabasedistributed.IGeoDataServer (in)replicaName
- The replicaName (in)desc
- A reference to a com.esri.arcgis.geodatabase.IGPReplicaDescription (in)repOptions
- A reference to a com.esri.arcgis.geodatabase.IGPReplicaOptions (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean synchronizeReplica(IGeoDataServer gds1, IGeoDataServer gds2, IGPReplica rep1, IGPReplica rep2, int pol, int dir, boolean columnLevel) throws IOException, AutomationException
The SynchronizeReplica method provides a way to synchronize changes between a replica pair in a connected environment. This method may be used with check-out replicas, two way replicas, or one way replicas. If you are using replication in a disconnected environment, where the replicas are not on the same network, you must use the IGeoDataServer interface to synchronize changes. Please see the GeoDataServer coclass for more information.
The SynchronizeReplica method requires two input geodataserver objects, gds1 and gds2. One geodataserver must reference the geodatabase with the parent replica and the other the geodatabase with the child replica. The order is not important. For example, if gds1 references the child, gds2 would reference the parent or vice versa.
The rep1 and rep2 parameters take GPReplica objects for the parent and child replicas. See the GPReplica coclass for more information. These parameters must be consistent with the ordering of the geodataserver objects passed in for gds1 and gds2. For example, if gds1 refers to the geodatabase with the parent replica then rep1 must reference the parent replica. The gds2 and rep2 parameters in the same way must then refer to the child replica.
During synchronization, changes are first applied to a synchronization version. For 2 way and 1 way replicas, this version is always reconciled and posted with the replica version. For check-out replicas, you can choose whether or not to reconcile and post. The pol parameter takes an esriReplicationAgentReconilePolicy enumeration value to determine how conflicts will be handled during reconcile. See the esriReplicationAgentReconcilePolicy enumeration for more information. The following describes the meaning of each enumeration:
esriRADetectConflicts -If conflicts occur, the reconcile process is aborted and you must reconcile and post manually after sycnhronization is completed.
esriRAResolveConflictsInFavorOfReplica1 - Automatically reconcile in favor of rep1 if conflicts arrise.
esriRAResolveConflictsInFavorOfReplica2 - Automatically reconcile in favor of rep2 if conflicts arrise.
esriRAResolveConflictsNone - This enumeration has meaning for check-out replicas only. It indicates that a the synchronization version should not be reconciled and post with the replica version during synchronization
The dir parameter takes an esriReplicaSynchronizeDirection enumeration value to define the direction to synchronize the changes. See esriReplicaSynchronizeDirection for more information.
If synchronizing in both directions, the reconcile policy set with the pol parameter will apply to both synchronizations. Therefore you must set the pol parameter to either resolve conflicts in favor of rep1 or resolve in favor of rep2. An error occurs if you specify any other policy when synchronizing in both directions.
synchronizeReplica
in interface IReplicationAgent
gds1
- A reference to a com.esri.arcgis.geodatabasedistributed.IGeoDataServer (in)gds2
- A reference to a com.esri.arcgis.geodatabasedistributed.IGeoDataServer (in)rep1
- A reference to a com.esri.arcgis.geodatabase.IGPReplica (in)rep2
- A reference to a com.esri.arcgis.geodatabase.IGPReplica (in)pol
- A com.esri.arcgis.geodatabasedistributed.esriReplicationAgentReconcilePolicy constant (in)dir
- A com.esri.arcgis.geodatabasedistributed.esriReplicaSynchronizeDirection constant (in)columnLevel
- The columnLevel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void extractData(String versionName, IGeoDataServer srcGDS, IGeoDataServer destGDS, IGPReplicaDescription desc) throws IOException, AutomationException
The IReplicationAgent::ExtractData method is used to copy data between geodatabases applying filters to determine the rows to copy.
This method requires two input geodataserver objects, a srcGDS and a destGDS. The srcGDS references the geodatabase that originally contains the data while the destGDS references the geodatabase where the data will be copied.
The desc parameter defines the data which will be extracted. See the GPReplicaDescription coclass for more information.
extractData
in interface IReplicationAgent
versionName
- The versionName (in)srcGDS
- A reference to a com.esri.arcgis.geodatabasedistributed.IGeoDataServer (in)destGDS
- A reference to a com.esri.arcgis.geodatabasedistributed.IGeoDataServer (in)desc
- A reference to a com.esri.arcgis.geodatabase.IGPReplicaDescription (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void createReplica2(String versionName, IGeoDataServer srcGDS, IGeoDataServer destGDS, String replicaName, IGPReplicaDescription desc, IGPReplicaOptions repOptions, String layersFolder) throws IOException, AutomationException
The IReplicationAgent2::CreateReplica2 method is used to create replicas in a connected environment. This method may be used to create check-out replicas, two way replicas, or one way replicas. To create replicas in a disconnected environement please see the IGeodataserver::CreateReplica method for more information
This method requires two input geodataserver objects,a srcGDS and a destGDS. The replicas will be created in the geodatabases represented by the input geodataserver objects. The srcGDS will host the parent replica, and the destGDS will host the child replica in the replica pair. See the GeoDataServer2 coclass for more information. The ReplicaName is a string that uniquely identifies the replica.
The versionName is the version on the geodatabase represented by the srcGDS from which the replica will be created.
The desc parameter defines the data which will be replicated. See the GPReplicaDescription coclass for more information.
The repOptions parameter defines replica options such as the replica access type. See the GPReplicaOptions coclass for more information.
The optional layersFolder parameter defines the location where layer files referencing the destGDS will be created.
createReplica2
in interface IReplicationAgent2
versionName
- The versionName (in)srcGDS
- A reference to a com.esri.arcgis.geodatabasedistributed.IGeoDataServer (in)destGDS
- A reference to a com.esri.arcgis.geodatabasedistributed.IGeoDataServer (in)replicaName
- The replicaName (in)desc
- A reference to a com.esri.arcgis.geodatabase.IGPReplicaDescription (in)repOptions
- A reference to a com.esri.arcgis.geodatabase.IGPReplicaOptions (in)layersFolder
- The layersFolder (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCancelTrackerByRef(ITrackCancel rhs1) throws IOException, AutomationException
The putref_CancelTracker method inspects for user cancellations.
setCancelTrackerByRef
in interface IReplicationAgentCancelControl
rhs1
- A reference to a com.esri.arcgis.system.ITrackCancel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |