public class SizedTimeoutCache
Class SizedTimeoutCache. Provides sizedtimeoutcache functionality for the Hytale server.
java.lang.Object > SizedTimeoutCache
Field Summary
expire
final
long
expire
Field expire.
key
final
K
key
Field key.
value
final
V
value
Field value.
resultValue
final
V
resultValue
Field resultValue.
timestamp
final
long
timestamp
Field timestamp.
newKey
final
K
newKey
Field newKey.
Method Detail
SizedTimeoutCache
public
public
SizedTimeoutCache
(final long expire, @Nonnull final TimeUnit unit, final int maxSize, @Nullable final Function func, @Nullable final BiConsumer destroyer)
Method SizedTimeoutCache.
- Parameters:
final longexpire@Nonnull final TimeUnitunitfinal intmaxSize@Nullable final Functionfunc@Nullable final BiConsumerdestroyer
CleanupFutureAction
public
new
CleanupFutureAction
(this.future)
Method CleanupFutureAction.
- Parameters:
this.futurethis.future
cleanup
public
void
cleanup
()
Method cleanup.
reduceLength
private
void
reduceLength
(final int targetSize)
Method reduceLength.
- Parameters:
final inttargetSize
shutdown
public
void
shutdown
()
Method shutdown.
get
public
V
get
(final K key)
Method get.
- Parameters:
final Kkey
put
public
void
put
(final K key, final V value)
Method put.
- Parameters:
final Kkeyfinal Vvalue
getWithReusedKey
public
V
getWithReusedKey
(final K reusedKey, @Nonnull final Function keyPool)
Method getWithReusedKey.
- Parameters:
final KreusedKey@Nonnull final FunctionkeyPool