|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LocalContentManager<T extends SynchronizationActionContext>
Object responsible for the local persistence operations associated with a
ClusteredDeploymentRepository
.
Method Summary | |
---|---|
void |
commitSynchronization(SynchronizationId<?> id)
Complete the two-phase commit process for the cluster synchronization that has been prepared . |
RepositoryContentMetadata |
createEmptyContentMetadata()
Creates a new RepositoryContentMetadata with a child
RepositoryRootMetadata for each of this persister's URIs,
but no RepositoryItemMetadata s under those roots. |
RepositoryContentMetadata |
getContentMetadataForAdd(RepositoryItemMetadata toAdd,
InputStream contentIS)
Generate content metadata that would reflect what the metadata would look like if an item with path vfsPath were added. |
RepositoryContentMetadata |
getContentMetadataForRemove(org.jboss.virtual.VirtualFile vf)
Generate content metadata that would reflect what the metadata would look like if an item with path vfsPath were removed. |
RepositoryContentMetadata |
getCurrentContentMetadata()
Scan the persistent store for the current content metadata. |
RepositoryItemMetadata |
getItemForAddition(String vfsPath)
Gets a RepositoryItemMetadata that will describe an item that
may be added. |
RepositoryContentMetadata |
getOfficialContentMetadata()
Gets the "official" record of the contents of the persistent store. |
org.jboss.virtual.VirtualFile |
getVirtualFileForItem(RepositoryItemMetadata item)
Get a VirtualFile for the content indicated by item . |
List<? extends SynchronizationAction<T>> |
initiateSynchronization(SynchronizationId<?> id,
List<ContentModification> modifications,
RepositoryContentMetadata toInstall,
boolean localLed)
Initiate a process of synchronizing this node's persistent store with the rest of the cluster |
void |
installCurrentContentMetadata()
Install the result from the latest call to getCurrentContentMetadata()
as the "official" content metadata. |
boolean |
prepareSynchronization(SynchronizationId<?> id)
Execute the prepare phase of the two phase commit process for the cluster synchronization that has been initialized . |
void |
rollbackSynchronization(SynchronizationId<?> id)
Roll back the cluster synchronization. |
Method Detail |
---|
RepositoryContentMetadata getOfficialContentMetadata()
RepositoryContentMetadata getCurrentContentMetadata() throws IOException
official version
have not been synchronized with the cluster.
IOException
List<? extends SynchronizationAction<T>> initiateSynchronization(SynchronizationId<?> id, List<ContentModification> modifications, RepositoryContentMetadata toInstall, boolean localLed)
id
- a unique id for this cluster synchronization processmodifications
- the overall list of modifications that will occur during
this processtoInstall
- TODOlocalLed
- true
if this node is driving the synchronization,
false
if another node is
SynchronizationAction
s each of which
can be executed by the caller to fulfill a portion of this node's role in
the overall cluster synchronization
IllegalStateException
- if another synchronization process has
been initiated and not yet completedboolean prepareSynchronization(SynchronizationId<?> id)
initialized
.
id
- id of the synchronization. Cannot be null
true
if the prepare phase was successful;
false
if not and the synchronization needs to be
rolled back
IllegalStateException
- if id
is not equal to the
id of an uncompleted synchronization started via
#initiateSynchronization(SynchronizationId, List, RepsitoryContentMetadata, boolean)
void commitSynchronization(SynchronizationId<?> id)
prepared
.
id
- id of the synchronization. Cannot be null
IllegalStateException
- if id
is not equal to the
id of an uncompleted synchronization started via
#initiateSynchronization(SynchronizationId, List, RepsitoryContentMetadata, boolean)
void rollbackSynchronization(SynchronizationId<?> id)
id
- id of the synchronization. Cannot be null
IllegalStateException
- if id
is not equal to the
id of an uncompleted synchronization started via
#initiateSynchronization(SynchronizationId, List, RepsitoryContentMetadata, boolean)
RepositoryContentMetadata createEmptyContentMetadata()
RepositoryContentMetadata
with a child
RepositoryRootMetadata
for each of this persister's URIs,
but no RepositoryItemMetadata
s under those roots. When a node that
is starting for the first time does not have a persisted set of
content metadata, this method should be used to create an object that can
be used as a base to
generate a set of modifications
needed to synchronize the node with the cluster.
RepositoryContentMetadata
with no grandchildren.void installCurrentContentMetadata()
getCurrentContentMetadata()
as the "official" content metadata. Intended for use during node startup
when the node discovers it is the only member of the cluster, and thus
that it's "current" content metadata is "official".
IllegalStateException
- if no "current" content metadata is available, either
because getCurrentContentMetadata()
hasn't been called, or because a cluster
synchronization has been executed to completion
since that call.RepositoryItemMetadata getItemForAddition(String vfsPath) throws IOException
RepositoryItemMetadata
that will describe an item that
may be added.
vfsPath
- path relative to one of this repository's root URIs
IOException
RepositoryContentMetadata getContentMetadataForAdd(RepositoryItemMetadata toAdd, InputStream contentIS) throws IOException
vfsPath
- contentIS
-
IOException
org.jboss.virtual.VirtualFile getVirtualFileForItem(RepositoryItemMetadata item) throws IOException
VirtualFile
for the content indicated by item
.
item
- metadata describing the content
IOException
RepositoryContentMetadata getContentMetadataForRemove(org.jboss.virtual.VirtualFile vf) throws IOException
vfsPath
- path relative to one of this repository's root URIs
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |