public interface Replication
Modifier and Type | Interface and Description |
---|---|
static class |
Replication.Action |
static interface |
Replication.IDocumentOpenCallback
This function is called for each document retrieved.
|
static interface |
Replication.IFolderAddCallback
GetDocumentsMode.GET_FOLDER_ADDS is specified but GetDocumentsMode.APPLY_FOLDER_ADDS is not,
this function is called for each document after the Replication.IDocumentOpenCallback function is called |
static interface |
Replication.IGetDocumentsCallback
Called once before any others but only if going to a server that is R6 or greater.
|
static interface |
Replication.IObjectAllocCallback
If
GetDocumentsMode.SEND_OBJECTS is specified and objectDb is not NULL,
this function is called exactly once for each object to provide the caller with information
about the object's size and ObjectID. |
static interface |
Replication.IObjectWriteCallback
This function is called for each "chunk" of each object if
GetDocumentsMode.SEND_OBJECTS
is specified and objectDb is not NULL. |
static class |
Replication.ReplicationHistoryFlags
Optional flags that can be used with
getReplicationHistory(Database, Set) . |
Modifier and Type | Field and Description |
---|---|
static int |
REPLHIST_ONLY_COMPLETE
Only return complete entries
|
static int |
REPLHIST_REMOVE_WILDCARDS
Don't copy wild card entries
|
static int |
REPLHIST_SORT_BY_DATE
Sort by date.
|
Modifier and Type | Method and Description |
---|---|
void |
clearReplicationHistory(Database db)
Resets the replication history of a database so enforce a full replication
|
void |
getDocuments(Database db,
int[] noteIds,
Set<Database.OpenDocumentMode>[] docOpenFlags,
int[] sinceSeqNum,
Set<GetDocumentsMode> controlFlags,
Database objectDb,
Replication.IGetDocumentsCallback getDocumentsCallback,
Replication.IDocumentOpenCallback docOpenCallback,
Replication.IObjectAllocCallback objectAllocCallback,
Replication.IObjectWriteCallback objectWriteCallback,
TemporalAccessor folderSinceTime,
Replication.IFolderAddCallback folderAddCallback)
This function will return a stream of documents to the caller through several callback functions.
It can be used to quickly and incrementally read a large number of docs from a database, skipping the transfer of item values where the item's sequence number is lower or equal a specified value (see sinceSeqNum parameter). |
ReplicaInfo |
getReplicaInfo(Database db)
This function gets the given database's
ReplicaInfo structure.This structure contains information that tells the Domino Replicator how to treat the database. The ".ID" member enables the Replicator to identify "replicas" of databases. The ".CutoffInterval" is the age in days at which deleted document identifiers are purged. Domino divides this interval into thirds, and for each third of the interval carries out what amounts to an incremental purge. These deleted document identifiers are sometimes called deletion stubs. The ".Cutoff" member is a DominoDateTime value that is calculated by
subtracting the Cutoff Interval (also called Purge Interval) from today's date.It prevents notes that are older than that date from being replicated at all. The ".Flags" member is a bit-wise encoded short that stores miscellaneous Replicator flags. |
List<ReplicationHistorySummary> |
getReplicationHistory(Database db,
Set<Replication.ReplicationHistoryFlags> flags)
Reads the replication history of the database
|
void |
saveDocument(Document doc,
boolean force,
boolean noRevisionHistory,
boolean keepModTime)
Saves a document with additional flags
|
String |
setNewReplicaID(Database db)
Changes the replica id of a database
|
void |
setReplicaInfo(Database db,
ReplicaInfo replicaInfo)
This function sets the given database's
ReplicaInfo structure.Use this function to set specific values, such as the replica ID, in the header data of a database. You may also use setReplicaInfo(Database, ReplicaInfo) to set values
such as the replication flags in the header of the database. |
static final int REPLHIST_REMOVE_WILDCARDS
static final int REPLHIST_SORT_BY_DATE
static final int REPLHIST_ONLY_COMPLETE
List<ReplicationHistorySummary> getReplicationHistory(Database db, Set<Replication.ReplicationHistoryFlags> flags)
db
- databaseflags
- Optional history summary flags enabling you to specify that wildcard entries are not to be returned and/or that sorting is to be done by date rather than by the default, server namevoid clearReplicationHistory(Database db)
db
- databaseString setNewReplicaID(Database db)
db
- databaseReplicaInfo getReplicaInfo(Database db)
ReplicaInfo
structure.DominoDateTime
value that is calculated by
subtracting the Cutoff Interval (also called Purge Interval) from today's date.db
- databasevoid setReplicaInfo(Database db, ReplicaInfo replicaInfo)
ReplicaInfo
structure.setReplicaInfo(Database, ReplicaInfo)
to set values
such as the replication flags in the header of the database.db
- databasereplicaInfo
- new replica infovoid getDocuments(Database db, int[] noteIds, Set<Database.OpenDocumentMode>[] docOpenFlags, int[] sinceSeqNum, Set<GetDocumentsMode> controlFlags, Database objectDb, Replication.IGetDocumentsCallback getDocumentsCallback, Replication.IDocumentOpenCallback docOpenCallback, Replication.IObjectAllocCallback objectAllocCallback, Replication.IObjectWriteCallback objectWriteCallback, TemporalAccessor folderSinceTime, Replication.IFolderAddCallback folderAddCallback)
sinceSeqNum
parameter). In that case, items are returns with type ItemDataType.TYPE_UNAVAILABLE
db
- databasenoteIds
- note ID(s) of doc(s) to be retrieveddocOpenFlags
- flags that control the manner in which the document is opened. This, in turn, controls what information about the doc is available to you and how it is structured. The flags are defined in Database.OpenDocumentMode
and may be or'ed together to combine functionality.sinceSeqNum
- since sequence number; controls which fields are accessible in the returned documents; e.g. if you specify a very high value, items with lower or equal sequence number have the type ItemDataType.TYPE_UNAVAILABLE
controlFlags
- Flags that control the actions of the function during doc retrieval. The flags are defined in GetDocumentsMode
.objectDb
- If binary objects are being retrieved (GetDocumentsMode.SEND_OBJECTS
is used) and this value is not NULL, objects will be stored in this database and attached to the incoming docs prior to Replication.IDocumentOpenCallback
being called.getDocumentsCallback
- Called once before any others but only if going to a server that is R6 or greater. If GetDocumentsMode.ORDER_BY_SIZE
is specified in options totalSize provides the approximate total size of the bytes to be returned in the documents and objects. These values are intended to be used for progress indicationdocOpenCallback
- This function is called for each document retrieved. If non-NULL, this is called for each document after all objects have been retrieved (if GetDocumentsMode.SEND_OBJECTS
is specified)objectAllocCallback
- If GetDocumentsMode.SEND_OBJECTS
is specified and objectDb
is not NULL, this function is called exactly once for each object to provide the caller with information about the object's size and ObjectID. The intent is to allow for the physical allocation for the object if need be. It is called before the Replication.IDocumentOpenCallback
for the corresponding documentobjectWriteCallback
- This function is called for each "chunk" of each object if GetDocumentsMode.SEND_OBJECTS
is specified and objectDb
is not NULL. For each object this will be called one or more timesfolderSinceTime
- TemporalAccessor
containing a time/date value specifying the earliest time to retrieve documents from the folder. If GetDocumentsMode.GET_FOLDER_ADDS
is specified this is the time folder operations should be retrieved fromfolderAddCallback
- If GetDocumentsMode.GET_FOLDER_ADDS
is specified but GetDocumentsMode.APPLY_FOLDER_ADDS
is not, this function is called for each document after the Replication.IDocumentOpenCallback
function is calledvoid saveDocument(Document doc, boolean force, boolean noRevisionHistory, boolean keepModTime)
doc
- document to saveforce
- true to force document save even if the document was modified in the meantimenoRevisionHistory
- true to not update $RevisionskeepModTime
- true to not update the modified time of the documentCopyright © 2019–2021 HCL. All rights reserved.