Package cz.o2.proxima.tools.groovy
Class ShellRunnable
- java.lang.Object
-
- cz.o2.proxima.tools.groovy.ShellRunnable
-
- Direct Known Subclasses:
Console,ProximaShell
public class ShellRunnable extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected freemarker.template.Configurationconfprotected DirectDataOperatordirectprotected java.util.List<ConsoleRandomReader>readersprotected Repositoryrepo
-
Constructor Summary
Constructors Constructor Description ShellRunnable(Repository repo, java.lang.String[] args)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends RepositoryProvider>createWrapperClass()voiddelete(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute)voiddelete(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute, long stamp)EntityDescriptorfindEntityDescriptor(java.lang.String entity)static ShellRunnableget()This is supposed to be called only from the groovysh initialized in this main method.WindowedStream<StreamElement>getBatchSnapshot(AttributeDescriptor<?> attrDesc)WindowedStream<StreamElement>getBatchSnapshot(AttributeDescriptor<?> attrDesc, long fromStamp, long toStamp)WindowedStream<StreamElement>getBatchUpdates(long startStamp, long endStamp, AttributeDescriptorProvider<?>... attrs)java.util.Optional<DirectDataOperator>getDirect()<T> WindowedStream<T>getImpulse(java.lang.String name, groovy.lang.Closure<T> factory)<T> WindowedStream<T>getPeriodicImpulse(java.lang.String name, groovy.lang.Closure<T> factory, long durationMs)ConsoleRandomReadergetRandomAccessReader(java.lang.String entity)<T> Stream<StreamElement>getStream(AttributeDescriptor<T> attrDesc, Position position, boolean stopAtCurrent)<T> Stream<StreamElement>getStream(AttributeDescriptor<T> attrDesc, Position position, boolean stopAtCurrent, boolean eventTime)Stream<StreamElement>getUnionStream(Position position, boolean eventTime, boolean stopAtCurrent, AttributeDescriptorProvider<?>... descriptors)voidput(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute, long stamp, java.lang.Object value)voidput(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute, java.lang.Object value)
-
-
-
Field Detail
-
repo
protected final Repository repo
-
conf
protected final freemarker.template.Configuration conf
-
readers
protected final java.util.List<ConsoleRandomReader> readers
-
direct
@Nullable protected final DirectDataOperator direct
-
-
Constructor Detail
-
ShellRunnable
public ShellRunnable(Repository repo, java.lang.String[] args)
-
-
Method Detail
-
createWrapperClass
public java.lang.Class<? extends RepositoryProvider> createWrapperClass() throws java.lang.Exception
- Throws:
java.lang.Exception
-
get
public static ShellRunnable get()
This is supposed to be called only from the groovysh initialized in this main method.- Returns:
- the singleton instance
-
getStream
public <T> Stream<StreamElement> getStream(AttributeDescriptor<T> attrDesc, Position position, boolean stopAtCurrent)
-
getStream
public <T> Stream<StreamElement> getStream(AttributeDescriptor<T> attrDesc, Position position, boolean stopAtCurrent, boolean eventTime)
-
getUnionStream
public Stream<StreamElement> getUnionStream(Position position, boolean eventTime, boolean stopAtCurrent, AttributeDescriptorProvider<?>... descriptors)
-
getBatchSnapshot
public WindowedStream<StreamElement> getBatchSnapshot(AttributeDescriptor<?> attrDesc)
-
getBatchSnapshot
public WindowedStream<StreamElement> getBatchSnapshot(AttributeDescriptor<?> attrDesc, long fromStamp, long toStamp)
-
getBatchUpdates
public WindowedStream<StreamElement> getBatchUpdates(long startStamp, long endStamp, AttributeDescriptorProvider<?>... attrs)
-
getImpulse
public <T> WindowedStream<T> getImpulse(@Nullable java.lang.String name, groovy.lang.Closure<T> factory)
-
getPeriodicImpulse
public <T> WindowedStream<T> getPeriodicImpulse(@Nullable java.lang.String name, groovy.lang.Closure<T> factory, long durationMs)
-
getRandomAccessReader
public ConsoleRandomReader getRandomAccessReader(java.lang.String entity)
-
put
public void put(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute, java.lang.Object value) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
put
public void put(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute, long stamp, java.lang.Object value) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
delete
public void delete(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
delete
public void delete(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute, long stamp) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
getDirect
public java.util.Optional<DirectDataOperator> getDirect()
-
findEntityDescriptor
public EntityDescriptor findEntityDescriptor(java.lang.String entity)
-
-