public class PartitionSchema extends ChangedFlag implements Cloneable, SharedObjectInterface, ResourceHolderInterface, RepositoryElementInterface, XMLInterface
| Modifier and Type | Field and Description |
|---|---|
static RepositoryObjectType |
REPOSITORY_ELEMENT_TYPE |
static String |
XML_TAG |
| Constructor and Description |
|---|
PartitionSchema() |
PartitionSchema(Node partitionSchemaNode) |
PartitionSchema(String name,
List<String> partitionIDs) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
boolean |
equals(Object obj) |
void |
expandPartitionsDynamically(int nrSlaves,
VariableSpace space) |
Date |
getChangedDate() |
String |
getDescription() |
String |
getHolderType()
Gets the high-level type of resource holder.
|
String |
getName() |
String |
getNumberOfPartitionsPerSlave() |
ObjectId |
getObjectId() |
ObjectRevision |
getObjectRevision() |
List<String> |
getPartitionIDs() |
RepositoryDirectoryInterface |
getRepositoryDirectory()
Not supported for Partition schema, return the root.
|
RepositoryObjectType |
getRepositoryElementType() |
String |
getTypeId() |
String |
getXML() |
int |
hashCode() |
boolean |
isDynamicallyDefined() |
boolean |
isShared() |
void |
replaceMeta(PartitionSchema partitionSchema) |
void |
retainPartitionsForSlaveServer(int slaveCount,
int slaveNumber)
Slaves don't need ALL the partitions, they just need a few.
So we should only retain those partitions that are of interest to the slave server. Divide the number of partitions (6) through the number of slaves (2) That gives you 0, 1, 2, 3, 4, 5 Slave 0 : 0, 2, 4 Slave 1 : 1, 3, 5 --> slaveNumber == partitionNr % slaveCount |
void |
setChangedDate(Date changedDate) |
void |
setDescription(String description) |
void |
setDynamicallyDefined(boolean dynamicallyDefined) |
void |
setName(String name) |
void |
setNumberOfPartitionsPerSlave(String numberOfPartitionsPerSlave) |
void |
setObjectId(ObjectId id) |
void |
setObjectRevision(ObjectRevision objectRevision) |
void |
setPartitionIDs(List<String> partitionIDs) |
void |
setRepositoryDirectory(RepositoryDirectoryInterface repositoryDirectory) |
void |
setShared(boolean shared) |
String |
toString() |
addObserver, clearChanged, deleteObserver, hasChanged, notifyObservers, setChanged, setChangedpublic static final String XML_TAG
public static final RepositoryObjectType REPOSITORY_ELEMENT_TYPE
public PartitionSchema()
public PartitionSchema(String name, List<String> partitionIDs)
name - partitionIDs - public PartitionSchema(Node partitionSchemaNode)
public void replaceMeta(PartitionSchema partitionSchema)
public String getName()
getName in interface RepositoryElementInterfacegetName in interface RepositoryObjectInterfacegetName in interface ResourceHolderInterfacegetName in interface SharedObjectInterfacepublic void setName(String name)
setName in interface RepositoryElementInterfacename - the name to setpublic void setPartitionIDs(List<String> partitionIDs)
partitionIDs - the partitionIDs to setpublic String getXML()
getXML in interface XMLInterfacegetXML in interface SharedObjectInterfacepublic boolean isShared()
isShared in interface SharedObjectInterfacepublic void setShared(boolean shared)
setShared in interface SharedObjectInterfaceshared - the shared to setpublic ObjectId getObjectId()
getObjectId in interface RepositoryElementInterfacegetObjectId in interface RepositoryObjectInterfacegetObjectId in interface ResourceHolderInterfacepublic String getDescription()
getDescription in interface RepositoryElementInterfacegetDescription in interface ResourceHolderInterfacepublic String getHolderType()
ResourceHolderInterfacegetHolderType in interface ResourceHolderInterfacepublic String getTypeId()
getTypeId in interface ResourceHolderInterfacepublic boolean isDynamicallyDefined()
public void setDynamicallyDefined(boolean dynamicallyDefined)
dynamicallyDefined - the dynamicallyDefined to setpublic String getNumberOfPartitionsPerSlave()
public void setNumberOfPartitionsPerSlave(String numberOfPartitionsPerSlave)
numberOfPartitionsPerSlave - the number of partitions per slave to set...public void expandPartitionsDynamically(int nrSlaves,
VariableSpace space)
public void retainPartitionsForSlaveServer(int slaveCount,
int slaveNumber)
slaveCount - slaveNumber - public RepositoryDirectoryInterface getRepositoryDirectory()
getRepositoryDirectory in interface RepositoryElementInterfacepublic void setRepositoryDirectory(RepositoryDirectoryInterface repositoryDirectory)
setRepositoryDirectory in interface RepositoryElementInterfacepublic RepositoryObjectType getRepositoryElementType()
getRepositoryElementType in interface RepositoryElementInterfacepublic void setObjectId(ObjectId id)
setObjectId in interface RepositoryElementInterfacepublic ObjectRevision getObjectRevision()
getObjectRevision in interface RepositoryElementInterfacepublic void setObjectRevision(ObjectRevision objectRevision)
setObjectRevision in interface RepositoryElementInterfacepublic void setDescription(String description)
setDescription in interface RepositoryElementInterfacepublic Date getChangedDate()
getChangedDate in interface SharedObjectInterfacepublic void setChangedDate(Date changedDate)
changedDate - the changedDate to setCopyright © 2018 Hitachi Vantara. All rights reserved.