com.esri.arcgis.geodatabase
Class GPReplica

java.lang.Object
  extended by com.esri.arcgis.geodatabase.GPReplica
All Implemented Interfaces:
IGPReplica, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, IXMLSerialize, IXMLVersionSupport, Externalizable, Serializable

public class GPReplica
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGPReplica, IXMLSerialize, IPersist, IPersistStream, IXMLVersionSupport, Externalizable

A GPReplica object

Remarks

A class the represents a replica in a geodatabase.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Constructor Summary
GPReplica()
          Constructs a GPReplica using ArcGIS Engine.
GPReplica(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GPReplica theGPReplica = (GPReplica) obj;
 
Method Summary
 void deserialize(IXMLSerializeData data)
          Deserializes an object from XML.
 boolean equals(Object o)
          Compare this object with another
 int getAccessType()
          Replica access type.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 Object getCreationDate()
          The date the replica was created.
 String getGUID()
          The guid of the replica.
 int getID()
          The ID of the replica.
 String getMinNamespaceSupported()
          The minimum namespace the class can serialize to (eg the 90 namespace).
 int getMyGenerationNumber()
          The generation number for the replica.
 String getName()
          Name of the replica.
 int getReconcilePolicy()
          The replica reconcile policy.
 IGPReplicaDescription getReplicaDescription()
          The replica description for the replica.
 int getReplicaState()
          The replica state.
 String getReplicaVersion()
          The name of the replica version.
 int getRole()
          The replica role.
 String getSibConnectionString()
          The connection string of the relative replica.
 int getSibGenerationNumber()
          The generation number of the relative replica.
 int getSibMyGenerationNumber()
          The last generation number that has been acknowledged by the relative replica.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int hashCode()
          the hashcode for this object
 void init(IReplica replica)
          Initializes the class using an IReplica object.
 void isDirty()
          isDirty
 boolean isHasConflicts()
          Indicates if the replica is in conflict.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void serialize(IXMLSerializeData data)
          Serializes an object to XML.
 void setAccessType(int accessType)
          Replica access type.
 void setCreationDate(Object replicaRole)
          The date the replica was created.
 void setGUID(String gUID)
          The guid of the replica.
 void setHasConflicts(boolean hasConflicts)
          Indicates if the replica is in conflict.
 void setID(int replicaID)
          The ID of the replica.
 void setMyGenerationNumber(int pMyGenerationNumber)
          The generation number for the replica.
 void setName(String replicaName)
          Name of the replica.
 void setReconcilePolicy(int policy)
          The replica reconcile policy.
 void setReplicaDescriptionByRef(IGPReplicaDescription replicaDescription)
          The replica description for the replica.
 void setReplicaState(int replicaState)
          The replica state.
 void setReplicaVersion(String replicaVersion)
          The name of the replica version.
 void setRole(int replicaRole)
          The replica role.
 void setSibConnectionString(String sibConnectionString)
          The connection string of the relative replica.
 void setSibGenerationNumber(int pSibGenerationNumber)
          The generation number of the relative replica.
 void setSibMyGenerationNumber(int pSibMyGenerationNumber)
          The last generation number that has been acknowledged by the relative replica.
 void writeExternal(ObjectOutput out)
           
 
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

GPReplica

public GPReplica()
          throws IOException,
                 UnknownHostException
Constructs a GPReplica using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

GPReplica

public GPReplica(Object obj)
          throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GPReplica theGPReplica = (GPReplica) obj;

Construct a GPReplica using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to GPReplica.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

init

public void init(IReplica replica)
          throws IOException,
                 AutomationException
Initializes the class using an IReplica object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
init in interface IGPReplica
Parameters:
replica - A reference to a com.esri.arcgis.geodatabase.IReplica (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setName

public void setName(String replicaName)
             throws IOException,
                    AutomationException
Name of the replica.

Description

The replica access type. Returns a value of the esriReplicaAccessType enumeration. See the esriReplicaAccessType enumeration for more information.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setName in interface IGPReplica
Parameters:
replicaName - The replicaName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public String getName()
               throws IOException,
                      AutomationException
Name of the replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getName in interface IGPReplica
Returns:
The replicaName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setID

public void setID(int replicaID)
           throws IOException,
                  AutomationException
The ID of the replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setID in interface IGPReplica
Parameters:
replicaID - The replicaID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getID

public int getID()
          throws IOException,
                 AutomationException
The ID of the replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getID in interface IGPReplica
Returns:
The replicaID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGUID

public void setGUID(String gUID)
             throws IOException,
                    AutomationException
The guid of the replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setGUID in interface IGPReplica
Parameters:
gUID - The gUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGUID

public String getGUID()
               throws IOException,
                      AutomationException
The guid of the replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getGUID in interface IGPReplica
Returns:
The gUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRole

public void setRole(int replicaRole)
             throws IOException,
                    AutomationException
The replica role.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setRole in interface IGPReplica
Parameters:
replicaRole - A com.esri.arcgis.geodatabase.esriReplicaRole constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRole

public int getRole()
            throws IOException,
                   AutomationException
The replica role.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getRole in interface IGPReplica
Returns:
A com.esri.arcgis.geodatabase.esriReplicaRole constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAccessType

public void setAccessType(int accessType)
                   throws IOException,
                          AutomationException
Replica access type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setAccessType in interface IGPReplica
Parameters:
accessType - A com.esri.arcgis.geodatabase.esriReplicaAccessType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAccessType

public int getAccessType()
                  throws IOException,
                         AutomationException
Replica access type.

Remarks

This property returns a value of the esriReplicaAccessType enumeration indicating the replicas access type. See the esriReplicaAccessType enumeration for more information.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getAccessType in interface IGPReplica
Returns:
A com.esri.arcgis.geodatabase.esriReplicaAccessType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCreationDate

public void setCreationDate(Object replicaRole)
                     throws IOException,
                            AutomationException
The date the replica was created.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setCreationDate in interface IGPReplica
Parameters:
replicaRole - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCreationDate

public Object getCreationDate()
                       throws IOException,
                              AutomationException
The date the replica was created.

Remarks

The replica creation date.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getCreationDate in interface IGPReplica
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setReplicaVersion

public void setReplicaVersion(String replicaVersion)
                       throws IOException,
                              AutomationException
The name of the replica version.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setReplicaVersion in interface IGPReplica
Parameters:
replicaVersion - The replicaVersion (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReplicaVersion

public String getReplicaVersion()
                         throws IOException,
                                AutomationException
The name of the replica version.

Description

The version the replica was created from.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getReplicaVersion in interface IGPReplica
Returns:
The replicaVersion
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMyGenerationNumber

public void setMyGenerationNumber(int pMyGenerationNumber)
                           throws IOException,
                                  AutomationException
The generation number for the replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setMyGenerationNumber in interface IGPReplica
Parameters:
pMyGenerationNumber - The pMyGenerationNumber (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMyGenerationNumber

public int getMyGenerationNumber()
                          throws IOException,
                                 AutomationException
The generation number for the replica.

Remarks

Returns the current generation number of a replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getMyGenerationNumber in interface IGPReplica
Returns:
The pMyGenerationNumber
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSibGenerationNumber

public void setSibGenerationNumber(int pSibGenerationNumber)
                            throws IOException,
                                   AutomationException
The generation number of the relative replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setSibGenerationNumber in interface IGPReplica
Parameters:
pSibGenerationNumber - The pSibGenerationNumber (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSibGenerationNumber

public int getSibGenerationNumber()
                           throws IOException,
                                  AutomationException
The generation number of the relative replica.

Remarks

Returns the generation number for a replica's sibling as it is known to the replica.

The generation number returned is based on the replicas last received message from it's relative.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getSibGenerationNumber in interface IGPReplica
Returns:
The pSibGenerationNumber
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSibMyGenerationNumber

public void setSibMyGenerationNumber(int pSibMyGenerationNumber)
                              throws IOException,
                                     AutomationException
The last generation number that has been acknowledged by the relative replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setSibMyGenerationNumber in interface IGPReplica
Parameters:
pSibMyGenerationNumber - The pSibMyGenerationNumber (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSibMyGenerationNumber

public int getSibMyGenerationNumber()
                             throws IOException,
                                    AutomationException
The last generation number that has been acknowledged by the relative replica.

Remarks

Returns the generation number that the sibling thinks is the replicas generation number.

The generation number returned is based on the replicas last received acknowledgement message from it's relative.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getSibMyGenerationNumber in interface IGPReplica
Returns:
The pSibMyGenerationNumber
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setReplicaState

public void setReplicaState(int replicaState)
                     throws IOException,
                            AutomationException
The replica state.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setReplicaState in interface IGPReplica
Parameters:
replicaState - A com.esri.arcgis.geodatabase.esriReplicaState constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReplicaState

public int getReplicaState()
                    throws IOException,
                           AutomationException
The replica state.

Remarks

Returns the replica state as a value of the esriReplicaState enumeration. See the esriReplicaState enumeration for more information.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getReplicaState in interface IGPReplica
Returns:
A com.esri.arcgis.geodatabase.esriReplicaState constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSibConnectionString

public void setSibConnectionString(String sibConnectionString)
                            throws IOException,
                                   AutomationException
The connection string of the relative replica.

Remarks

Use this method to set the connection string of the relative replicas geodatabase.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setSibConnectionString in interface IGPReplica
Parameters:
sibConnectionString - The sibConnectionString (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSibConnectionString

public String getSibConnectionString()
                              throws IOException,
                                     AutomationException
The connection string of the relative replica.

Remarks

Returns the connection string to the sibling replica database if it has been set.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getSibConnectionString in interface IGPReplica
Returns:
The sibConnectionString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setReplicaDescriptionByRef

public void setReplicaDescriptionByRef(IGPReplicaDescription replicaDescription)
                                throws IOException,
                                       AutomationException
The replica description for the replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setReplicaDescriptionByRef in interface IGPReplica
Parameters:
replicaDescription - A reference to a com.esri.arcgis.geodatabase.IGPReplicaDescription (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReplicaDescription

public IGPReplicaDescription getReplicaDescription()
                                            throws IOException,
                                                   AutomationException
The replica description for the replica.

Remarks

Returns the replica description. See the GPReplicaDescription coclass for more information.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getReplicaDescription in interface IGPReplica
Returns:
A reference to a com.esri.arcgis.geodatabase.IGPReplicaDescription
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setReconcilePolicy

public void setReconcilePolicy(int policy)
                        throws IOException,
                               AutomationException
The replica reconcile policy.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setReconcilePolicy in interface IGPReplica
Parameters:
policy - A com.esri.arcgis.geodatabase.esriReplicaReconcilePolicyType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReconcilePolicy

public int getReconcilePolicy()
                       throws IOException,
                              AutomationException
The replica reconcile policy.

Remarks

Returns the replica reconcile policy as a value of the esriReplicaReconcilePolicyType enumeration. See the esriReplicaReconcilePolicyType enumeration for more information.

This property will always return esriReplicaReconcilePolicyNone as reconcile policies are not stored with the replica. Reconcile policies are specified at synchronization time. See the IGeoDataServer::ImportReplicaDataChanges and IReplicationAgent::SynchronizeReplica methods for more information.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getReconcilePolicy in interface IGPReplica
Returns:
A com.esri.arcgis.geodatabase.esriReplicaReconcilePolicyType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHasConflicts

public void setHasConflicts(boolean hasConflicts)
                     throws IOException,
                            AutomationException
Indicates if the replica is in conflict.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setHasConflicts in interface IGPReplica
Parameters:
hasConflicts - The hasConflicts (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasConflicts

public boolean isHasConflicts()
                       throws IOException,
                              AutomationException
Indicates if the replica is in conflict.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
isHasConflicts in interface IGPReplica
Returns:
The hasConflicts
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

serialize

public void serialize(IXMLSerializeData data)
               throws IOException,
                      AutomationException
Serializes an object to XML.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
serialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deserialize

public void deserialize(IXMLSerializeData data)
                 throws IOException,
                        AutomationException
Deserializes an object from XML.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
deserialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMinNamespaceSupported

public String getMinNamespaceSupported()
                                throws IOException,
                                       AutomationException
The minimum namespace the class can serialize to (eg the 90 namespace).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getMinNamespaceSupported in interface IXMLVersionSupport
Returns:
The namespaceURI
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException