public class DirectoryListComputation extends Object implements GraphComputation<DirectoryListKey,DirectoryList>
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<? extends ComputeKey<? extends ComputeResult>> |
discoverDeps(DirectoryListKey key,
ComputationEnvironment env)
Compute dependent keys required to compute given key, and a set of dependencies as listed by
GraphComputation.discoverPreliminaryDeps(ComputeKey) . |
com.google.common.collect.ImmutableSet<? extends ComputeKey<? extends ComputeResult>> |
discoverPreliminaryDeps(DirectoryListKey key)
Compute dependent keys required to compute given the current key.
|
ComputationIdentifier<DirectoryList> |
getIdentifier() |
static DirectoryListComputation |
of(ProjectFilesystemView fileSystemView) |
DirectoryList |
transform(DirectoryListKey key,
ComputationEnvironment env)
Perform a transformation identified by key
Key into a final type Result . |
public static DirectoryListComputation of(ProjectFilesystemView fileSystemView)
public ComputationIdentifier<DirectoryList> getIdentifier()
getIdentifier
in interface GraphComputation<DirectoryListKey,DirectoryList>
ComputeKey.getIdentifier()
public DirectoryList transform(DirectoryListKey key, ComputationEnvironment env) throws Exception
GraphComputation
Key
into a final type Result
. This
transformation should be performed synchronously.transform
in interface GraphComputation<DirectoryListKey,DirectoryList>
key
- The Key of the requested resultenv
- The execution environment containing results of keys from GraphComputation.discoverDeps(ComputeKey, ComputationEnvironment)
and GraphComputation.discoverPreliminaryDeps(ComputeKey)
Exception
public com.google.common.collect.ImmutableSet<? extends ComputeKey<? extends ComputeResult>> discoverDeps(DirectoryListKey key, ComputationEnvironment env)
GraphComputation
GraphComputation.discoverPreliminaryDeps(ComputeKey)
. The results of those computations will be
available in GraphComputation.transform(ComputeKey, ComputationEnvironment)
as a part of ComputationEnvironment
discoverDeps
in interface GraphComputation<DirectoryListKey,DirectoryList>
key
- the current key to transformenv
- The execution environment containing results of keys from GraphComputation.discoverPreliminaryDeps(ComputeKey)
public com.google.common.collect.ImmutableSet<? extends ComputeKey<? extends ComputeResult>> discoverPreliminaryDeps(DirectoryListKey key)
GraphComputation
GraphComputation.discoverDeps(ComputeKey, ComputationEnvironment)
as
a part of ComputationEnvironment
, and GraphComputation.transform(ComputeKey,
ComputationEnvironment)
discoverPreliminaryDeps
in interface GraphComputation<DirectoryListKey,DirectoryList>
key
- the current key to transformGraphComputation.discoverDeps(ComputeKey, ComputationEnvironment)
and
GraphComputation.transform(ComputeKey, ComputationEnvironment)
of the current key depends on