public class ThriftRuleKeyHasher extends Object implements RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
RuleKeyHasher.Container, RuleKeyHasher.Wrapper
Constructor and Description |
---|
ThriftRuleKeyHasher(ThriftRuleKeyLogger ruleKeyLogger)
Creates a
ThriftRuleKeyHasher |
Modifier and Type | Method and Description |
---|---|
void |
flushToLogger()
Writes the object out to the logger
|
com.facebook.buck.log.thrift.rulekeys.FullRuleKey |
hash()
Finishes populating the ruleKey with remaining key/value pairs and returns it
|
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putArchiveMemberPath(Path relativeArchivePath,
Path archiveMemberPath,
com.google.common.hash.HashCode hash) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putBoolean(boolean val) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putBuildTarget(BuildTarget buildTarget) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putBuildTargetSourcePath(BuildTargetSourcePath buildTargetSourcePath) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putBytes(byte[] bytes) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putCharacter(char val) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putContainer(RuleKeyHasher.Container container,
int length)
Adds a container to the stack.
|
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putKey(String key)
Puts the field's key (i.e.
|
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putKeyPath(Path key)
Puts the stringified path as a key.
|
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putNonHashingPath(Path path) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putNull()
Puts the field's value, Java types
|
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putNumber(Number val) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putPath(Path path,
com.google.common.hash.HashCode hash) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putPattern(Pattern pattern) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putRuleKey(RuleKey ruleKey) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putRuleType(RuleType ruleType) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putSha1(Sha1HashCode sha1)
Puts the field's value, Buck specific types
|
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putString(String val) |
RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> |
putWrapper(RuleKeyHasher.Wrapper wrapper) |
void |
setHashKey(com.google.common.hash.HashCode code)
Sets the hash key on the ruleKey object
|
public ThriftRuleKeyHasher(ThriftRuleKeyLogger ruleKeyLogger)
ThriftRuleKeyHasher
ruleKeyLogger
- The ruleKeyLogger used to write serialized thrift structures outpublic RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putKey(String key)
RuleKeyHasher
putKey
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putKeyPath(Path key)
RuleKeyHasher
putKeyPath
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putNull()
RuleKeyHasher
putNull
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putCharacter(char val)
putCharacter
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putBoolean(boolean val)
putBoolean
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putNumber(Number val)
putNumber
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putString(String val)
putString
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putBytes(byte[] bytes)
putBytes
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putPattern(Pattern pattern)
putPattern
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putSha1(Sha1HashCode sha1)
RuleKeyHasher
putSha1
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putPath(Path path, com.google.common.hash.HashCode hash)
putPath
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putArchiveMemberPath(Path relativeArchivePath, Path archiveMemberPath, com.google.common.hash.HashCode hash)
putArchiveMemberPath
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
relativeArchivePath
- relative path to archive.archiveMemberPath
- path to archive member.public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putNonHashingPath(Path path)
putNonHashingPath
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putRuleKey(RuleKey ruleKey)
putRuleKey
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putRuleType(RuleType ruleType)
putRuleType
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putBuildTarget(BuildTarget buildTarget)
putBuildTarget
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putBuildTargetSourcePath(BuildTargetSourcePath buildTargetSourcePath)
putBuildTargetSourcePath
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putContainer(RuleKeyHasher.Container container, int length)
putContainer
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
container
- The container typelength
- The number of elements in the container. This can vary slightly by container typepublic RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey> putWrapper(RuleKeyHasher.Wrapper wrapper)
putWrapper
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public com.facebook.buck.log.thrift.rulekeys.FullRuleKey hash()
hash
in interface RuleKeyHasher<com.facebook.buck.log.thrift.rulekeys.FullRuleKey>
public void setHashKey(com.google.common.hash.HashCode code)
code
- The hash code to usepublic void flushToLogger()