public final class TLfnReplicationResource extends Object
This class represents the in-memory preview of the replication for a single resource.
Consult the class javadoc of TLfnReplication
for more information.
Modifier and Type | Class and Description |
---|---|
static class |
TLfnReplicationResource.Status
Enumeration representing the replication status of a resource
|
Modifier and Type | Method and Description |
---|---|
TLfnReplicationAreaOfInterest |
getAreaOfInterest()
Returns the geographic region to which the replication of the data will be limited.
|
String |
getID()
Returns the id of this resource.
|
ALfnResourceMetadata |
getMasterMetadata()
Returns the metadata of this resource as it is on the master tile store.
|
ALfnResourceMetadata |
getProjectedSlaveMetadata()
Returns the metadata of this resource as it will be on the slave tile store when actually performing the replication.
|
ALfnResourceMetadata |
getSlaveMetadata()
Returns the metadata of this resource as it is on the slave tile store.
|
TLfnReplicationResource.Status |
getStatus()
Returns the replication status of this resource.
|
boolean |
isMarkedForReplication()
Returns
true when the resource will be replicated, false otherwise. |
void |
markForReplication()
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 |
unmarkForReplication()
Calling this method indicates that this resource should not be replicated.
|
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.
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 calling getProjectedSlaveMetadata()
.
public void setAreaOfInterest(TLfnReplicationAreaOfInterest aAreaOfInterest)
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.
aAreaOfInterest
- The area of interest. Use null
when the whole dataset must be replicated.public boolean isMarkedForReplication()
Returns true
when the resource will be replicated, false
otherwise.
true
when the resource will be replicated, false
otherwise.markForReplication()
,
unmarkForReplication()
public ALfnResourceMetadata 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.
null
when the resource is deleted on the master tile store and only present on the slave.public ALfnResourceMetadata 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.
null
when the resource is only present on the master.public ALfnResourceMetadata 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.
null
when the resource will be removed on the slave tile storepublic TLfnReplicationResource.Status getStatus()
Returns the replication status of this resource.
public String getID()
Returns the id of this resource.
public TLfnReplicationAreaOfInterest 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.
null
when the whole dataset must be replicated.