public class CancelableDiff extends Object implements org.apache.jackrabbit.oak.spi.state.NodeStateDiff
NodeStateDiff
that cancels itself when a condition occurs. The
condition is represented by an externally provided instance of Supplier
. If the Supplier
returns true
, the diffing process
will be canceled at the first possible occasion.Constructor and Description |
---|
CancelableDiff(org.apache.jackrabbit.oak.spi.state.NodeStateDiff delegate,
Supplier<Boolean> canceled) |
Modifier and Type | Method and Description |
---|---|
boolean |
childNodeAdded(String name,
org.apache.jackrabbit.oak.spi.state.NodeState after) |
boolean |
childNodeChanged(String name,
org.apache.jackrabbit.oak.spi.state.NodeState before,
org.apache.jackrabbit.oak.spi.state.NodeState after) |
boolean |
childNodeDeleted(String name,
org.apache.jackrabbit.oak.spi.state.NodeState before) |
boolean |
propertyAdded(org.apache.jackrabbit.oak.api.PropertyState after) |
boolean |
propertyChanged(org.apache.jackrabbit.oak.api.PropertyState before,
org.apache.jackrabbit.oak.api.PropertyState after) |
boolean |
propertyDeleted(org.apache.jackrabbit.oak.api.PropertyState before) |
public CancelableDiff(org.apache.jackrabbit.oak.spi.state.NodeStateDiff delegate, Supplier<Boolean> canceled)
public final boolean propertyAdded(org.apache.jackrabbit.oak.api.PropertyState after)
propertyAdded
in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
public final boolean propertyChanged(org.apache.jackrabbit.oak.api.PropertyState before, org.apache.jackrabbit.oak.api.PropertyState after)
propertyChanged
in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
public final boolean propertyDeleted(org.apache.jackrabbit.oak.api.PropertyState before)
propertyDeleted
in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
public final boolean childNodeAdded(String name, org.apache.jackrabbit.oak.spi.state.NodeState after)
childNodeAdded
in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
public final boolean childNodeChanged(String name, org.apache.jackrabbit.oak.spi.state.NodeState before, org.apache.jackrabbit.oak.spi.state.NodeState after)
childNodeChanged
in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
public final boolean childNodeDeleted(String name, org.apache.jackrabbit.oak.spi.state.NodeState before)
childNodeDeleted
in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.