streamcruncher.api
Class OutputSession
java.lang.Object
streamcruncher.api.OutputSession
public class OutputSession
- extends java.lang.Object
Each Output Event Stream can have 1 instance, which should be used to
retrieve Events that have been added and committed into the
underlying Database by the Kernel. The Kernel does not check if there already
is another instance of this Class for the same Output Event Stream. So, the
user must take care to create only one instance per Stream. The
instances are not Thread-safe. The session can be started and closed
and re-started and so on any number of times.
|
Method Summary |
void |
close()
|
java.lang.String |
getName()
|
java.util.List<java.lang.Object[]> |
readEvents()
Blocks until at least one Event is available. |
java.util.List<java.lang.Object[]> |
readEvents(long timeout,
java.util.concurrent.TimeUnit timeUnit)
|
void |
start()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OutputSession
public OutputSession(java.lang.String name)
throws StreamCruncherException
- Throws:
StreamCruncherException
getName
public java.lang.String getName()
start
public void start()
throws StreamCruncherException
- Throws:
StreamCruncherException
readEvents
public java.util.List<java.lang.Object[]> readEvents()
throws StreamCruncherException
- Blocks until at least one Event is available.
- Returns:
-
- Throws:
StreamCruncherException
readEvents
public java.util.List<java.lang.Object[]> readEvents(long timeout,
java.util.concurrent.TimeUnit timeUnit)
throws StreamCruncherException
- Parameters:
timeout - timeUnit -
- Returns:
- Empty array if it times out without receiving any new Events.
- Throws:
StreamCruncherException
java.lang.InterruptedException
close
public void close()
throws StreamCruncherException
- Throws:
StreamCruncherException
Copyright © 2006 - 2008 Ashwin Jayaprakash. All Rights Reserved.
(Docs generated on 3-November-2007 )