start new:
tmux
start new with session name:
tmux new -s myname
package example.ignite; | |
import com.tencent.perf.ignite.AlwaysTrueRemoteFilter; | |
import org.apache.ignite.Ignite; | |
import org.apache.ignite.IgniteCache; | |
import org.apache.ignite.IgniteLogger; | |
import org.apache.ignite.Ignition; | |
import org.apache.ignite.binary.BinaryBasicIdMapper; | |
import org.apache.ignite.binary.BinaryBasicNameMapper; | |
import org.apache.ignite.cache.query.ContinuousQuery; |
package example.perf.protostuff; | |
/** | |
* Created by jackeylv on 2016/7/13. | |
*/ | |
public class Foo { | |
private Object object; | |
public Foo(){ | |
object = null; |
package example.protostuff; | |
/** | |
* wrapper is needed for interface and abstract modifier | |
* Created by jackeylv on 2016/7/14. | |
*/ | |
public class ClassWrapper { | |
private Object wrappedValue; | |
public ClassWrapper(){ |
public class CacheOperations { | |
public void putOperations(Ignite ignite, String cache_name, int thread_num) { | |
TimeRecord tr = new TimeRecord(); | |
tr.reset(); | |
int step = 20000; | |
PutTask[] tasks = new PutTask[thread_num]; | |
for (int i = 0; i < thread_num; i++) { | |
tasks[i] = new PutTask(ignite, cache_name, step*(i-1), step*i); | |
tasks[i].start(); | |
} |
public class CacheOperations { | |
public void putOperations(Ignite ignite, String cache_name, int thread_num) { | |
TimeRecord tr = new TimeRecord(); | |
tr.reset(); | |
int step = 20000; | |
PutTask[] tasks = new PutTask[thread_num]; | |
for (int i = 0; i < thread_num; i++) { | |
tasks[i] = new PutTask(ignite, cache_name, step*(i-1), step*i); | |
tasks[i].start(); | |
} |
public class IgniteClientCacheEventPut { | |
public static void main(String[] args) { | |
Ignition.setClientMode(true); | |
try (Ignite ignite = Ignition.start(args[0])){ | |
String cache_name = "ignite-cache"; | |
IgniteCache cache = ignite.getOrCreateCache(cache_name); | |
UUID uuid = addEventListener(ignite, cache_name); | |
new CacheOperations().putOperations(ignite, cache_name, Integer.valueOf(args[1])); | |
removeEventListener(ignite, uuid); |
public class IgniteClientSimplePut { | |
public static void main(String[] args) { | |
Ignition.setClientMode(true); | |
try (Ignite ignite = Ignition.start(args[0])){ | |
String cache_name = "ignite-cache"; | |
IgniteCache cache = ignite.getOrCreateCache(cache_name); | |
new CacheOperations().putOperations(ignite, cache_name, Integer.valueOf(args[1])); | |
System.out.println("Cache size: "+cache.size()); |
#! /usr/bin/env python2.7 | |
#encoding:utf-8 | |
#@description:一个python守护进程的例子 | |
#@tags:python,daemon | |
import sys | |
import os | |
import time | |
import atexit | |
from signal import SIGTERM |