MCPcopy Index your code

hub / github.com/daichi-m/jach / functions

Functions154 in github.com/daichi-m/jach

↓ 39 callersMethodwrite
Writes the given message to the destination. If the destination does not have space, the write blocks until space is freed up in the destination. @pa
src/main/java/io/github/daichim/jach/internal/Writable.java:24
↓ 25 callersMethodselectCase
Create a {@link ChannelAction} for the given {@link Channel} with a given {@link Consumer} action that is going to be executed for each message in the
src/main/java/io/github/daichim/jach/JachChannels.java:110
↓ 22 callersMethodclose
Closes the channel. Read and write operation on a closed channel would throw a {@link ClosedChannelException}
src/main/java/io/github/daichim/jach/channel/Channel.java:38
↓ 22 callersMethodread
Reads the next message from the source. If there are no elements in the source, the read blocks until an element is available. If the source declared
src/main/java/io/github/daichim/jach/internal/Readable.java:26
↓ 13 callersMethodcopyOf
Returns a copy of the message that should be stored in the in-memory data structure of the {@link Channel}. @param message The message to store in th
src/main/java/io/github/daichim/jach/channel/copier/Copier.java:25
↓ 11 callersMethodselector
Convenience method to create a new {@link Selector} from the given set of {@link ChannelAction}s. @param actions The list of {@link ChannelAction}s t
src/main/java/io/github/daichim/jach/JachChannels.java:123
↓ 10 callersMethodnext
Gets the next message for this thread from the underlying channel. If no message is available, this calls blocks until a new message is read in this t
src/main/java/io/github/daichim/jach/internal/ChannelIterator.java:48
↓ 9 callersMethodaccept
(Void unused)
src/main/java/io/github/daichim/jach/channel/Action.java:12
↓ 9 callersMethodrun
()
src/main/java/io/github/daichim/jach/routines/Routines.java:10
↓ 8 callersMethodtryRead
Tries to read a message from the source. If there is no message, the method will return {@literal null}. @return The next message from the source if
src/main/java/io/github/daichim/jach/internal/Readable.java:48
↓ 7 callersMethodcanRead
The source can be read from. It does not necessarily means the read will succeed as it can get blocked or timeout, but it means that the source still
src/main/java/io/github/daichim/jach/internal/Readable.java:56
↓ 7 callersMethodgetId
Returns a unique identifier for the {@link Channel}. @return A unique identifier for this {@link Channel}
src/main/java/io/github/daichim/jach/channel/Channel.java:52
↓ 7 callersMethodtryWrite
Tries to write a message to the destination. If the destination does not have free space, the call returns immediately with {@literal false}. @param
src/main/java/io/github/daichim/jach/internal/Writable.java:46
↓ 6 callersMethodcreateChannels
()
src/test/java/io/github/daichim/jach/channel/selector/SelectorTest.java:38
↓ 6 callersMethodforEach
Perform an action over the messages as received in the current thread from the channel. This method will not propagate the {@link NoSuchChannelElement
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:423
↓ 6 callersMethoduntilDone
Runs an loop over all the channels and executes the action associated with that channel as and when a message is received on that channel. The loop br
src/main/java/io/github/daichim/jach/channel/selector/Selector.java:205
↓ 5 callersMethodregisterAfterWriteAction
For internal uses only . Register an {@link AfterWriteAction} to this {@link Channel}.
src/main/java/io/github/daichim/jach/channel/Channel.java:65
↓ 4 callersMethodclose
()
src/main/java/io/github/daichim/jach/channel/selector/Selector.java:134
↓ 4 callersMethodremove
Remove is unsupported operation for a channel. This always throws an {@link UnsupportedOperationException}. @throws UnsupportedOperationException Alw
src/main/java/io/github/daichim/jach/internal/ChannelIterator.java:69
↓ 4 callersMethodselect
Waits for a message to be recieved on any of the channels associated with the {@link ChannelAction}s of this {@link Selector} and execute the action c
src/main/java/io/github/daichim/jach/channel/selector/Selector.java:162
↓ 4 callersMethodtick
()
src/test/java/io/github/daichim/jach/time/TickerTest.java:112
↓ 3 callersMethodcanWrite
The destination allows write to happen. It does not necessarily means the write will succeed, it can block or timeout if there is no space, but if spa
src/main/java/io/github/daichim/jach/internal/Writable.java:55
↓ 3 callersMethodcloseChannel
(String channel)
src/main/java/io/github/daichim/jach/channel/selector/Selector.java:295
↓ 3 callersMethodgetAvailable
Available slots in the channel. This is the difference between the capacity and the number of messages already in the channel. @return The number of
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:396
↓ 3 callersMethodisOpen
Checks if the channel has been closed. @return {@literal true}, if the channel has been closed, {@literal false} otherwise.
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:348
↓ 3 callersMethodmarkDone
Mark the iterator as done (i.e., the underlying channel has been closed).
src/main/java/io/github/daichim/jach/internal/ChannelIterator.java:93
↓ 3 callersMethodof
Creates a new {@link Selector} from the given set of {@link ChannelAction}s. @param actions The list of {@link ChannelAction}s that this {@link Selec
src/main/java/io/github/daichim/jach/channel/selector/Selector.java:103
↓ 3 callersMethodrunAfterWriteActions
()
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:199
↓ 2 callersMethodafterFunc
Execute an action after the given duration in a different thread. @param duration The duration of time @param unit The unit that is associated wi
src/main/java/io/github/daichim/jach/JachTime.java:93
↓ 2 callersMethodblockedRead
(Optional<Integer> timeout, Optional<TimeUnit> unit)
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:269
↓ 2 callersMethodblockedWrite
(T message, Optional<Integer> timeout, Optional<TimeUnit> unit)
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:154
↓ 2 callersMethodhasNext
Returns {@literal true} if the parent channel has not been closed, {@literal false} otherwise. @return {@literal true} if the parent channel has not
src/main/java/io/github/daichim/jach/internal/ChannelIterator.java:33
↓ 2 callersMethodisOpen
Returns {@literal true} in case the channel is open, else return {@literal false} @return {@literal true} if the channel has been open, {@literal fal
src/main/java/io/github/daichim/jach/channel/Channel.java:45
↓ 2 callersMethodmake
Create a generic {@link BufferedChannel} of the given capacity. It uses {@link KryoCopier} to copy the messages to the channel. @param type The c
src/main/java/io/github/daichim/jach/JachChannels.java:82
↓ 2 callersMethodtimer
Returns a new {@link Timer} instance which sends the current time on it's {@link Channel} once the timer expires. @param duration The duration after
src/main/java/io/github/daichim/jach/JachTime.java:79
↓ 2 callersMethoduntilOrDefault
Runs an loop over all the channels and executes the action associated with that channel as and when a message is received on that channel. When no mes
src/main/java/io/github/daichim/jach/channel/selector/Selector.java:253
↓ 1 callersMethodclose
Closes the timer. Anu subsequent operation on the timer would throw a {@link ClosedChannelException}.
src/main/java/io/github/daichim/jach/time/Timer.java:49
↓ 1 callersMethodcreateAFW
(ChannelAction ca)
src/main/java/io/github/daichim/jach/channel/selector/Selector.java:117
↓ 1 callersMethodforEachRemaining
Runs the give action for each of the remaining messages that are read in this thread from the underlying channel, until the channel is closed. When th
src/main/java/io/github/daichim/jach/internal/ChannelIterator.java:79
↓ 1 callersMethodgetCapacity
The capacity of this {@link BufferedChannel}. Capacity is the number of messages that can be inserted into the channel without a read before the write
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:386
↓ 1 callersMethodgo
Run a routine on JaCh's executor.
src/main/java/io/github/daichim/jach/JachChannels.java:140
↓ 1 callersMethodmakeStr
Create a {@link BufferedChannel} that stores strings with the given capacity. It uses {@link RefCopier} to copy the messages to the channel. @param c
src/main/java/io/github/daichim/jach/JachChannels.java:37
↓ 1 callersMethodonWrite
()
src/main/java/io/github/daichim/jach/internal/AfterWriteAction.java:12
↓ 1 callersMethodread
Reads the next message from the channel. If the channel is currently empty, the thread blocks until a message is available for reading. @throws NoSuc
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:215
↓ 1 callersMethodreset
Resets the duration of the timer to the new duration. @param duration The new duration for the {@link Timer} @param unit The unit corresponding t
src/main/java/io/github/daichim/jach/time/Timer.java:63
↓ 1 callersMethodreset
Resets the tick interval of this ticker to the new interval. Subsequent events on this ticker will occur after the given interval. @param duration Th
src/main/java/io/github/daichim/jach/time/Ticker.java:59
↓ 1 callersMethodspliterator
{@link Spliterator} is not supported for a {@link Channel}. It will throw a {@link UnsupportedOperationException}. @see Channel#spliterator()
src/main/java/io/github/daichim/jach/channel/Channel.java:73
↓ 1 callersMethodstop
Stops the {@link Ticker} from sending further events. This method also cleans up existing resources held by this {@link Ticker} instance. Any subseque
src/main/java/io/github/daichim/jach/time/Ticker.java:44
↓ 1 callersMethodwrite
Writes a non-null message to the channel. If the channel does not have enough space to write the message, the thread is blocked until space is availab
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:103
MethodBufferedChannel
(int capacity, Class<T> clazz, Copier<T> copier)
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:77
MethodChannelIterator
(BufferedChannel<T> parentChannel)
src/main/java/io/github/daichim/jach/internal/ChannelIterator.java:21
MethodClosedChannelException
()
src/main/java/io/github/daichim/jach/exception/ClosedChannelException.java:13
MethodCopyException
()
src/main/java/io/github/daichim/jach/exception/CopyException.java:4
MethodKryoCopier
Initializes a {@link KryoCopier} with default instance of Kryo and Serializer.
src/main/java/io/github/daichim/jach/channel/copier/KryoCopier.java:23
MethodMessageValidator
()
src/test/java/io/github/daichim/jach/utils/MessageValidator.java:15
MethodNoSuchChannelElementException
()
src/main/java/io/github/daichim/jach/exception/NoSuchChannelElementException.java:16
MethodSelector
()
src/main/java/io/github/daichim/jach/channel/selector/Selector.java:85
MethodTickCounter
()
src/test/java/io/github/daichim/jach/time/TickerTest.java:107
MethodTicker
(long duration, TimeUnit unit, ScheduledExecutorService executor)
src/main/java/io/github/daichim/jach/time/Ticker.java:27
MethodTimeoutException
()
src/main/java/io/github/daichim/jach/exception/TimeoutException.java:7
MethodTimer
(long duration, TimeUnit unit, ScheduledExecutorService executor)
src/main/java/io/github/daichim/jach/time/Timer.java:31
MethodTooManySelectorException
()
src/main/java/io/github/daichim/jach/exception/TooManySelectorException.java:16
MethodUnbufferedChannel
(Class<T> clazz)
src/main/java/io/github/daichim/jach/channel/UnbufferedChannel.java:15
Methodafter
Returns a {@link Channel} which will send the current time after the given duration expires. @param duration The duration after which to send the eve
src/main/java/io/github/daichim/jach/JachTime.java:53
MethodafterFuncCancelledTest
()
src/test/java/io/github/daichim/jach/time/TimerTest.java:77
MethodafterFuncTest
()
src/test/java/io/github/daichim/jach/time/TimerTest.java:57
MethodafterWriteActionsBlockingTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:224
MethodafterWriteActionsTimeoutTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:252
MethodafterWriteActionsTryWriteTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:283
MethodcanRead
Returns {@literal true} if the channel can be read. @return {@literal true} if the channel can be read, else {@literal false}.
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:264
MethodcanReadTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:445
MethodcanWrite
Returns {@literal true} if the channel can be written to. @return {@literal true} if the channel can be written to, else {@literal false}.
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:194
MethodcanWriteTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:213
MethodchannelAvailabilityTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:545
MethodchannelCapacityTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:539
Methodcleanup
()
src/test/java/io/github/daichim/jach/channel/selector/SelectorTest.java:331
MethodcleanupClass
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:601
Methodclose
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:235
Methodclose
Closes this channel. On closure of this channel, all the threads that are stuck in {@link #read()} or {@link #write(Object)} are interrupted. The iter
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:311
MethodcloseAfterWriteActionTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:521
MethodcloseChannel
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:591
MethodcloseChannelReadInterruptTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:462
MethodcloseChannelWriteInterruptTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:486
MethodcopyOf
@see Copier#copyOf(Object)
src/main/java/io/github/daichim/jach/channel/copier/KryoCopier.java:50
MethodcopyOf
@see Copier#copyOf(Object)
src/main/java/io/github/daichim/jach/channel/copier/RefCopier.java:14
MethodcopyOfCustomSerializerTest
()
src/test/java/io/github/daichim/jach/channel/copier/KryoCopierTest.java:33
MethodcopyOfDefaultSerializerTest
()
src/test/java/io/github/daichim/jach/channel/copier/KryoCopierTest.java:10
MethodforEachRemainingTest
()
src/test/java/io/github/daichim/jach/internal/ChannelIteratorTest.java:114
MethodforEachTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:564
MethodgetDataType
Returns the type of the element that is stored in this {@link Channel} @return The concrete class of type T that is stored in this {@link Channel}.
src/main/java/io/github/daichim/jach/channel/Channel.java:59
MethodgetDataType
@see Channel#getDataType()
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:366
MethodgetId
Returns a unique id for this {@link Channel}. @return A unique id for this {@link Channel}.
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:358
MethodinitializeChannelForWrite
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:47
MethodisChannelClosedTest
()
src/test/java/io/github/daichim/jach/channel/BufferedChannelTest.java:515
Methoditerator
Returns an {@link Iterator} to iterate over the channel. The iterator is a blocking iterator. If no elements are present in the channel the iterators
src/main/java/io/github/daichim/jach/channel/BufferedChannel.java:410
MethodmakeInt
Create a {@link BufferedChannel} that stores integers with the given capacity. It uses {@link RefCopier} to copy the messages to the channel. @param
src/main/java/io/github/daichim/jach/JachChannels.java:59
MethodmultiThreadSelectTest
()
src/test/java/io/github/daichim/jach/channel/selector/SelectorTest.java:88
MethodnewMessage
()
src/test/java/io/github/daichim/jach/utils/MessageValidator.java:20
MethodnormalTickerTest
()
src/test/java/io/github/daichim/jach/time/TickerTest.java:27
MethodnormalTimerTest
()
src/test/java/io/github/daichim/jach/time/TimerTest.java:22
next →1–100 of 154, ranked by callers