Class FaultySlotLeaseStore

java.lang.Object
me.ahoo.cosid.store.tck.FaultySlotLeaseStore
All Implemented Interfaces:
AutoCloseable, me.ahoo.cosid.lease.SlotLeaseStore

public final class FaultySlotLeaseStore extends Object implements me.ahoo.cosid.lease.SlotLeaseStore
A SlotLeaseStore that applies the faults of a FaultInjector before delegating, for the lease tests of R1 (delays, timeouts, a lost renewal response then its replay).
  • Constructor Details

    • FaultySlotLeaseStore

      public FaultySlotLeaseStore(me.ahoo.cosid.lease.SlotLeaseStore delegate, FaultInjector faults)
  • Method Details

    • acquire

      public me.ahoo.cosid.lease.AcquireResult acquire(String namespace, me.ahoo.cosid.lease.Owner owner, int limit, Duration ttl, Duration tolerance, int slotOffset, OptionalInt preferredSlot)
      Specified by:
      acquire in interface me.ahoo.cosid.lease.SlotLeaseStore
    • renew

      public Optional<me.ahoo.cosid.lease.SlotLease> renew(me.ahoo.cosid.lease.SlotLease lease, Duration ttl, Duration tolerance)
      Specified by:
      renew in interface me.ahoo.cosid.lease.SlotLeaseStore
    • release

      public boolean release(me.ahoo.cosid.lease.SlotLease lease, long lastIssued)
      Specified by:
      release in interface me.ahoo.cosid.lease.SlotLeaseStore
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface me.ahoo.cosid.lease.SlotLeaseStore