Created
July 6, 2020 03:55
-
-
Save obbyK/47700f69cf2418e51b00c478172c8ea9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.quarkus.test.hazelcast; | |
import com.hazelcast.core.Hazelcast; | |
import com.hazelcast.core.HazelcastInstance; | |
import javax.enterprise.context.ApplicationScoped; | |
import javax.inject.Inject; | |
import io.quarkus.scheduler.Scheduled; | |
@ApplicationScoped | |
public class HazelcastServerTestResource { | |
@Inject | |
HazelcastInstance hazelcastClient; | |
public void connect(String key, String value) { | |
hazelcastClient.<String, String>getMap("TEST").put(key,value); | |
} | |
@Scheduled(every = "5s") | |
void testConnect() { | |
connect("test","test"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment