Package cz.o2.proxima.tools.groovy
Class Console
- java.lang.Object
-
- cz.o2.proxima.tools.groovy.Console
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class Console extends java.lang.Object implements java.lang.AutoCloseable
This is the groovysh based console.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INITIAL_STATEMENT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static Console
create(cz.o2.proxima.typesafe.config.Config config, Repository repo)
static Console
create(cz.o2.proxima.typesafe.config.Config config, Repository repo, java.lang.String[] args)
void
createWrapperClass()
void
delete(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute)
void
delete(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute, long stamp)
EntityDescriptor
findEntityDescriptor(java.lang.String entity)
static Console
get()
This is supposed to be called only from the groovysh initialized in this main method.static Console
get(java.lang.String[] args)
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)
ConsoleRandomReader
getRandomAccessReader(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)
static void
main(java.lang.String[] args)
void
put(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute, long stamp, java.lang.String value)
void
put(EntityDescriptor entityDesc, AttributeDescriptor<?> attrDesc, java.lang.String key, java.lang.String attribute, java.lang.String value)
cz.o2.proxima.direct.server.rpc.proto.service.Rpc.GetResponse
rpcGet(EntityDescriptor entity, java.lang.String key, java.lang.String attr, java.lang.String host, int port)
cz.o2.proxima.direct.server.rpc.proto.service.Rpc.ListResponse
rpcList(EntityDescriptor entity, java.lang.String key, AttributeDescriptor<?> wildcard, java.lang.String offset, int limit, java.lang.String host, int port)
-
-
-
Field Detail
-
INITIAL_STATEMENT
public static final java.lang.String INITIAL_STATEMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static final Console get()
This is supposed to be called only from the groovysh initialized in this main method.- Returns:
- the singleton instance
-
get
public static Console get(java.lang.String[] args)
-
create
public static Console create(cz.o2.proxima.typesafe.config.Config config, Repository repo)
-
create
public static Console create(cz.o2.proxima.typesafe.config.Config config, Repository repo, java.lang.String[] args)
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createWrapperClass
public void createWrapperClass() throws java.lang.Exception
- Throws:
java.lang.Exception
-
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.String 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.String 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)
-
rpcList
public cz.o2.proxima.direct.server.rpc.proto.service.Rpc.ListResponse rpcList(EntityDescriptor entity, java.lang.String key, AttributeDescriptor<?> wildcard, java.lang.String offset, int limit, java.lang.String host, int port)
-
rpcGet
public cz.o2.proxima.direct.server.rpc.proto.service.Rpc.GetResponse rpcGet(EntityDescriptor entity, java.lang.String key, java.lang.String attr, java.lang.String host, int port)
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-