Package com.usatiuk.kleppmanntree

# Class KleppmannTree<TimestampT extends Comparable<TimestampT>,PeerIdT extends Comparable<PeerIdT>,MetaT extends NodeMeta,NodeIdT>

java.lang.Object
com.usatiuk.kleppmanntree.KleppmannTree<TimestampT,PeerIdT,MetaT,NodeIdT>

public class KleppmannTree<TimestampT extends Comparable<TimestampT>,PeerIdT extends Comparable<PeerIdT>,MetaT extends NodeMeta,NodeIdT> extends Object

## Constructor Summary

Constructors
Constructor
Description
`KleppmannTree(StorageInterface<TimestampT,PeerIdT,MetaT,NodeIdT> storage, PeerInterface<PeerIdT> peers, Clock<TimestampT> clock, OpRecorder<TimestampT,PeerIdT,MetaT,NodeIdT> opRecorder)`

## Method Summary

Modifier and Type
Method
Description
`void`
`applyExternalOp(PeerIdT from, OpMove<TimestampT,PeerIdT,MetaT,NodeIdT> op)`
`org.apache.commons.lang3.tuple.Pair<String,NodeIdT>`
`findParent(Function<TreeNode<TimestampT,PeerIdT,MetaT,NodeIdT>,Boolean> kidPredicate)`
`<LocalMetaT extends MetaT>
void`
`move(NodeIdT newParent, LocalMetaT newMeta, NodeIdT child)`
`void`
`move(NodeIdT newParent, MetaT newMeta, NodeIdT child, boolean failCreatingIfExists)`
`void`
`recordBoostrapFor(PeerIdT host)`
`NodeIdT`
`traverse(List<String> names)`
`NodeIdT`
`traverse(NodeIdT fromId, List<String> names)`
`void`
`updateExternalTimestamp(PeerIdT from, TimestampT timestamp)`
`void`
`walkTree(Consumer<TreeNode<TimestampT,PeerIdT,MetaT,NodeIdT>> consumer)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### KleppmannTree

public KleppmannTree(StorageInterface<TimestampT,PeerIdT,MetaT,NodeIdT> storage, PeerInterface<PeerIdT> peers, Clock<TimestampT> clock, OpRecorder<TimestampT,PeerIdT,MetaT,NodeIdT> opRecorder)

## Method Details

### traverse

public NodeIdT traverse(NodeIdT fromId, List<String> names)

### traverse

public NodeIdT traverse(List<String> names)

### move

public <LocalMetaT extends MetaT> void move(NodeIdT newParent, LocalMetaT newMeta, NodeIdT child)

### move

public void move(NodeIdT newParent, MetaT newMeta, NodeIdT child, boolean failCreatingIfExists)

### applyExternalOp

public void applyExternalOp(PeerIdT from, OpMove<TimestampT,PeerIdT,MetaT,NodeIdT> op)

### updateExternalTimestamp

public void updateExternalTimestamp(PeerIdT from, TimestampT timestamp)

### walkTree

public void walkTree(Consumer<TreeNode<TimestampT,PeerIdT,MetaT,NodeIdT>> consumer)

### findParent

public org.apache.commons.lang3.tuple.Pair<String,NodeIdT> findParent(Function<TreeNode<TimestampT,PeerIdT,MetaT,NodeIdT>,Boolean> kidPredicate)

### recordBoostrapFor

public void recordBoostrapFor(PeerIdT host)