SizedTimeoutCache

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 long expire
@Nonnull final TimeUnit unit
final int maxSize
@Nullable final Function func
@Nullable final BiConsumer destroyer

CleanupFutureAction

public new CleanupFutureAction (this.future)

Method CleanupFutureAction.

Parameters:
this.future this.future

cleanup

public void cleanup ()

Method cleanup.

reduceLength

private void reduceLength (final int targetSize)

Method reduceLength.

Parameters:
final int targetSize

shutdown

public void shutdown ()

Method shutdown.

get

public V get (final K key)

Method get.

Parameters:
final K key

put

public void put (final K key, final V value)

Method put.

Parameters:
final K key
final V value

getWithReusedKey

public V getWithReusedKey (final K reusedKey, @Nonnull final Function keyPool)

Method getWithReusedKey.

Parameters:
final K reusedKey
@Nonnull final Function keyPool