Class TLfnReplicationResource
This class represents the in-memory preview of the replication for a single resource.
Consult the class javadoc of TLfnReplication
for more information.
- Since:
- 2015.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration representing the replication status of a resource -
Method Summary
Modifier and TypeMethodDescriptionReturns the geographic region to which the replication of the data will be limited.getID()
Returns the id of this resource.Returns the metadata of this resource as it is on the master tile store.Returns the metadata of this resource as it will be on the slave tile store when actually performing the replication.Returns the metadata of this resource as it is on the slave tile store.Returns the replication status of this resource.boolean
Returnstrue
when the resource will be replicated,false
otherwise.void
Calling this method indicates that this resource should be replicated.void
setAreaOfInterest
(TLfnReplicationAreaOfInterest aAreaOfInterest) Limits the replicated data for this resource to a certain geographic region.void
Calling this method indicates that this resource should not be replicated.
-
Method Details
-
unmarkForReplication
public void unmarkForReplication()Calling this method indicates that this resource should not be replicated. This means the metadata and data of this resource on the slave will remain unaffected when performing replication.
-
markForReplication
public void markForReplication()Calling this method indicates that this resource should be replicated. This means that the metadata and data of this resource on the slave will match the metadata and data of this resource on the master after performing replication.
You can check whether the resource will be replicated or not by calling
isMarkedForReplication()
. You can investigate the result of the replication by callinggetProjectedSlaveMetadata()
. -
setAreaOfInterest
Limits the replicated data for this resource to a certain geographic region. When a non-
null
area is specified, only the data overlapping with this region will be transferred from the master to the slave tile store.Warning: it is not possible to set a non-
null
area for vector coverages. Calling this method for a vector coverage with a non-null
value will result in an exception.- Parameters:
aAreaOfInterest
- The area of interest. Usenull
when the whole dataset must be replicated.
-
isMarkedForReplication
public boolean isMarkedForReplication()Returns
true
when the resource will be replicated,false
otherwise.- Returns:
true
when the resource will be replicated,false
otherwise.- See Also:
-
getMasterMetadata
Returns the metadata of this resource as it is on the master tile store.
Note that this method does not perform a query to the tile store. All queries are done the moment the
TLfnReplication
instance is created. The returned metadata reflects the state of the resource as it was at that specific moment.- Returns:
- the metadata of this resource as it is on the master tile store.
This can be
null
when the resource is deleted on the master tile store and only present on the slave.
-
getSlaveMetadata
Returns the metadata of this resource as it is on the slave tile store.
Note that this method does not perform a query to the tile store. All queries are done the moment the
TLfnReplication
instance is created. The returned metadata reflects the state of the resource as it was at that specific moment.- Returns:
- the metadata of this resource as it is on the slave tile store.
This can be
null
when the resource is only present on the master.
-
getProjectedSlaveMetadata
Returns the metadata of this resource as it will be on the slave tile store when actually performing the replication. It is a preview of the result of actually performing the replication.
- Returns:
- the metadata of this resource as it will be on the slave tile store when actually performing the replication.
This can be
null
when the resource will be removed on the slave tile store
-
getStatus
Returns the replication status of this resource.
- Returns:
- the replication status of this resource.
-
getID
Returns the id of this resource.
- Returns:
- the id of this resource.
-
getAreaOfInterest
Returns the geographic region to which the replication of the data will be limited. When this is a non-
null
area, only the data overlapping with this region will be transferred from the master to the slave tile store.- Returns:
- the area of interest. Will be
null
when the whole dataset must be replicated.
-