/** * A simplistic policy that never allows stealing to occur. */ @InstrumentedClass public class NeverStealPolicy<I> implements StealPolicy<I> { public boolean shouldSteal(final ProcessingBucket<I> victim, final ProcessingBucket<I> thief) { return false; } }
/** * A simplistic policy that never allows stealing to occur. */ @InstrumentedClass public class NeverStealPolicy<I> implements StealPolicy<I> { public boolean shouldSteal(final ProcessingBucket<I> victim, final ProcessingBucket<I> thief) { return false; } }
/** * A simplistic policy that never allows stealing to occur. */ @InstrumentedClass public class NeverStealPolicy<I> implements StealPolicy<I> { public boolean shouldSteal(final ProcessingBucket<I> victim, final ProcessingBucket<I> thief) { return false; } }
/** * A steal policy that will allow stealing once a bucket has fallen behind the thief by a certain amount of time. * <p> * In practical terms this means a bucket can be stolen from if its last processing time was more than * the threshold time before the thief's last processing time. */ @InstrumentedClass public class FallBehindStealPolicy<I> implements StealPolicy<I> { private final long maxAllowedFallBehind; /** * @param maxAllowedFallBehind the amount of milliseconds that the victim is allowed * to fall behind the thief before its work gets stolen */ public FallBehindStealPolicy(final long maxAllowedFallBehind) { this.maxAllowedFallBehind = maxAllowedFallBehind; } public boolean shouldSteal(final ProcessingBucket<I> victim, final ProcessingBucket<I> thief) { return thief.getLastProcessing() - victim.getLastProcessing() > maxAllowedFallBehind; } }
/** * A steal policy that will allow stealing once a bucket has fallen behind the thief by a certain amount of time. * <p> * In practical terms this means a bucket can be stolen from if its last processing time was more than * the threshold time before the thief's last processing time. */ @InstrumentedClass public class FallBehindStealPolicy<I> implements StealPolicy<I> { private final long maxAllowedFallBehind; /** * @param maxAllowedFallBehind the amount of milliseconds that the victim is allowed * to fall behind the thief before its work gets stolen */ public FallBehindStealPolicy(final long maxAllowedFallBehind) { this.maxAllowedFallBehind = maxAllowedFallBehind; } public boolean shouldSteal(final ProcessingBucket<I> victim, final ProcessingBucket<I> thief) { return thief.getLastProcessing() - victim.getLastProcessing() > maxAllowedFallBehind; } }
/** * A steal policy that will allow stealing once a bucket has fallen behind the thief by a certain amount of time. * <p> * In practical terms this means a bucket can be stolen from if its last processing time was more than * the threshold time before the thief's last processing time. */ @InstrumentedClass public class FallBehindStealPolicy<I> implements StealPolicy<I> { private final long maxAllowedFallBehind; /** * @param maxAllowedFallBehind the amount of milliseconds that the victim is allowed * to fall behind the thief before its work gets stolen */ public FallBehindStealPolicy(final long maxAllowedFallBehind) { this.maxAllowedFallBehind = maxAllowedFallBehind; } public boolean shouldSteal(final ProcessingBucket<I> victim, final ProcessingBucket<I> thief) { return thief.getLastProcessing() - victim.getLastProcessing() > maxAllowedFallBehind; } }
@InstrumentedClass public class TerracottaNode implements ClusterNode {
@InstrumentedClass public class TerracottaNode implements ClusterNode {
@InstrumentedClass public class TerracottaNode implements ClusterNode {
@InstrumentedClass public class TerracottaTextBucket implements ClusteredTextBucket { private final ReadWriteLock lock = new TerracottaReadWriteLock();
@InstrumentedClass public class TerracottaTextBucket implements ClusteredTextBucket { private final ReadWriteLock lock = new TerracottaReadWriteLock();
@InstrumentedClass public class TerracottaTextBucket implements ClusteredTextBucket { private final ReadWriteLock lock = new TerracottaReadWriteLock();
@InstrumentedClass public class DefaultAsyncConfig implements AsyncConfig2 { private final static AsyncConfig INSTANCE = new DefaultAsyncConfig();
@InstrumentedClass public class DefaultAsyncConfig implements AsyncConfig2 { private final static AsyncConfig INSTANCE = new DefaultAsyncConfig();
@InstrumentedClass public class DefaultAsyncConfig implements AsyncConfig { private final static AsyncConfig INSTANCE = new DefaultAsyncConfig();
@InstrumentedClass public class ProcessingBucketItems<E> implements List<E> { private E[] data;
@InstrumentedClass public class TerracottaAtomicLong extends Number implements ClusteredAtomicLong {
@InstrumentedClass public class TerracottaAtomicLong extends Number implements ClusteredAtomicLong {
@InstrumentedClass public class TerracottaAtomicLong extends Number implements ClusteredAtomicLong {
@InstrumentedClass @HonorTransient class ProcessingBucketGroup<I> implements ClusterListener {