|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepositoryClusteringHandler
Handles intra-cluster operations for a clustered DeploymentRepository.
Method Summary | |
---|---|
RepositoryItemMetadata |
addDeploymentContent(String vfsPath,
InputStream contentIS)
Read the content from the given input stream and add it to the repository across the cluster. |
String |
getLocalNodeName()
Gets the unique id for this node within the cluster partition |
String |
getPartitionName()
Gets the name of the cluster partition this hander is associated with |
org.jboss.profileservice.spi.ProfileKey |
getProfileKey()
Gets the key identifying the Profile this handler is meant for |
void |
initialize(LocalContentManager<?> localContentManager)
Handler should prepare itself for operation. |
boolean |
isImmutable()
Gets whether this handler allows a node to push content changes to the cluster. |
boolean |
lockGlobally()
Acquire a cluster-wide lock for this repository. |
boolean |
lockLocally()
Acquire a local-only lock for this repository. |
void |
removeDeploymentContent(org.jboss.virtual.VirtualFile vf)
Remove content from the repository across the cluster. |
void |
setImmutable(boolean immutable)
Sets whether this handler allows a node to push content changes to the cluster. |
void |
shutdown()
Notification that handler can perform clean up work as it will not be asked to coordinate further with the cluster. |
RepositoryContentMetadata |
synchronizeContent(boolean pullFromCluster)
Synchronize this node's repository content with the rest of the cluster. |
void |
unlockGlobally()
Release a cluster-wide lock obtained in lockGlobally() . |
void |
unlockLocally()
Release a local lock obtained in lockLocally() . |
Method Detail |
---|
org.jboss.profileservice.spi.ProfileKey getProfileKey()
String getPartitionName()
String getLocalNodeName()
boolean isImmutable()
true
, what changes will be accepted are an
implementation detail.
true
if content changes are not allowed;
false
otherwisevoid setImmutable(boolean immutable)
true
, what changes will be accepted are an
implementation detail.
immutable
- true
if content changes are not allowed;
false
otherwisevoid initialize(LocalContentManager<?> localContentManager) throws Exception
localContentManager
- object that handles repository content locally
Exception
void shutdown() throws Exception
Exception
boolean lockGlobally()
local lock
is already held.
true
if the lock was acquired, false
if notboolean lockLocally()
cluster-wide lock
.
true
if the lock was acquired, false
if notvoid unlockGlobally()
lockGlobally()
.
void unlockLocally()
lockLocally()
.
RepositoryContentMetadata synchronizeContent(boolean pullFromCluster) throws InconsistentRepositoryStructureException, IOException
pullFromCluster
- true
if the synchronization should
include pulling in changes from the cluster, e.g.
as part of the startup of a node or during a merge
following the healing of a cluster split;
false
if the synchronization should
only consist of pushing local modifications to
the cluster, e.g. as part of a hot deployment scan
InconsistentRepositoryStructureException
IOException
RepositoryItemMetadata addDeploymentContent(String vfsPath, InputStream contentIS) throws IOException
vfsPath
- path describing where the content should be located in
the repositorycontentIS
- input stream from which the content can be read
IOException
void removeDeploymentContent(org.jboss.virtual.VirtualFile vf) throws Exception
vf
- VirtualFile that contains the content
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |