public class ClusterMembership extends Object
Constructor and Description |
---|
ClusterMembership(ClusterIdentifier clusterIdentifierIfAbsent) |
Modifier and Type | Method and Description |
---|---|
void |
associateFileWithCluster(File file,
long timestamp,
ClusterIdentifier clusterIdentifier)
Indicates a particular file is a member of a particular cluster.
|
ClusterIdentifier |
clusterFor(File file)
Finds the corresponding cluster for a particular file.
|
public ClusterMembership(ClusterIdentifier clusterIdentifierIfAbsent)
public void associateFileWithCluster(File file, long timestamp, ClusterIdentifier clusterIdentifier) throws OperationFailedException
file
- the file.timestamp
- the timetamp (seconds since the epoch).clusterIdentifier
- an identifier for the cluster.OperationFailedException
- if the file is already associated with a cluster.public ClusterIdentifier clusterFor(File file)
file
- the file to find a cluster for.clusterIdentifierIfAbsent
(as
per constructor) if the file is not mapped.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.