public class IgniteSink<IN> extends org.apache.flink.streaming.api.functions.sink.RichSinkFunction<IN>
Modifier and Type | Field and Description |
---|---|
protected String |
cacheName
Cache name.
|
protected Ignite |
ignite
Ignite instance.
|
protected String |
igniteCfgFile
Ignite grid configuration file.
|
protected IgniteDataStreamer |
streamer
Ignite Data streamer instance.
|
Constructor and Description |
---|
IgniteSink(String cacheName,
String igniteCfgFile)
Default IgniteSink constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Stops streamer.
|
boolean |
getAllowOverwrite()
Obtains flag for enabling overwriting existing values in cache.
|
long |
getAutoFlushFrequency()
Obtains data flush frequency.
|
String |
getCacheName()
Gets the cache name.
|
Ignite |
getIgnite()
Gets the Ignite instance.
|
String |
getIgniteConfigFile()
Gets Ignite configuration file.
|
void |
invoke(IN in)
Transfers data into grid.
|
void |
open(org.apache.flink.configuration.Configuration parameter)
Starts streamer.
|
void |
setAllowOverwrite(boolean allowOverwrite)
Enables overwriting existing values in cache.
|
void |
setAutoFlushFrequency(long autoFlushFrequency)
Specifies data flush frequency into the grid.
|
protected transient Ignite ignite
protected transient IgniteDataStreamer streamer
protected final String igniteCfgFile
protected final String cacheName
public String getCacheName()
public String getIgniteConfigFile()
public Ignite getIgnite()
public long getAutoFlushFrequency()
public void setAutoFlushFrequency(long autoFlushFrequency)
autoFlushFrequency
- Flush frequency.public boolean getAllowOverwrite()
public void setAllowOverwrite(boolean allowOverwrite)
allowOverwrite
- Flag value.public void open(org.apache.flink.configuration.Configuration parameter)
open
in interface org.apache.flink.api.common.functions.RichFunction
open
in class org.apache.flink.api.common.functions.AbstractRichFunction
IgniteException
- If failed.public void close()
close
in interface org.apache.flink.api.common.functions.RichFunction
close
in class org.apache.flink.api.common.functions.AbstractRichFunction
IgniteException
- If failed.public void invoke(IN in)
IgniteDataStreamer
.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019