Package io.aether.net.fastMeta
Class AutoFlushContext
- java.lang.Object
-
- io.aether.net.fastMeta.MetaContextBase
-
- io.aether.net.fastMeta.AutoFlushContext
-
- All Implemented Interfaces:
MetaContext,io.aether.utils.ToString
- Direct Known Subclasses:
PooledAutoFlushContext
public class AutoFlushContext extends MetaContextBase
-
-
Field Summary
Fields Modifier and Type Field Description protected longmaxPeriodMsprotected intmaxSizeprotected longminPeriodMs-
Fields inherited from class io.aether.net.fastMeta.MetaContextBase
firstWritableFlag, flushAction, localApi, parent, toRemote, writableListener
-
Fields inherited from interface io.aether.net.fastMeta.MetaContext
CONTEXT_NOT_ACTIVE, CONTEXT_NOT_ACTIVE_AFUTURE, CONTEXT_NOT_ACTIVE_FUTURE, STUB
-
-
Constructor Summary
Constructors Constructor Description AutoFlushContext()AutoFlushContext(long minPeriodMs, long maxPeriodMs, int maxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfireWritable(boolean w)Publishes a writability-state change to listeners associated with this context.booleanisActive()Reports whether this context is currently active.protected voidnotifyDataAdded()-
Methods inherited from class io.aether.net.fastMeta.MetaContextBase
acquireDataOut, applyLocalApiSwitch, connectionContext, createChildContext, findContext, flush, getLocalApi, invokeLocalMethodBefore, isEmpty, isLocallyActive, isLocked, lock, onFirstWritable, onFlush, onWritable, releaseDataOut, remoteDataToArray, remoteDataToArray, retire, runFlushLifecycle, sendToRemote, setActivePredicate, setLocalApi, setLocalMethodBeforeListener, size, switchLocalApi, toAString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.aether.net.fastMeta.MetaContext
close, getProperty, invokeLocalMethodAfter, invokeRemoteMethodAfter, makeRemote, onFlushData, sendToRemote
-
-
-
-
Method Detail
-
notifyDataAdded
protected void notifyDataAdded()
- Overrides:
notifyDataAddedin classMetaContextBase
-
isActive
public boolean isActive()
Description copied from interface:MetaContextReports whether this context is currently active.Hierarchical implementations may require both the local context and all of its parents to be active.
- Specified by:
isActivein interfaceMetaContext- Overrides:
isActivein classMetaContextBase- Returns:
truewhen the context is active
-
fireWritable
public void fireWritable(boolean w)
Description copied from interface:MetaContextPublishes a writability-state change to listeners associated with this context.- Specified by:
fireWritablein interfaceMetaContext- Overrides:
fireWritablein classMetaContextBase- Parameters:
w- new writability state
-
-