Giter Site home page Giter Site logo

infinispan.playground.remote.listener's Introduction

infinispan.playground.remote.listener

Infinispan HotRod remote listener events

Author: Wolf-Dieter Fink Level: Basics Technologies: Infinispan, Hot Rod

What is it?

Example how to use HotRod client side listener to receive cache events

Hot Rod is a binary TCP client-server protocol. The Hot Rod protocol facilitates faster client and server interactions in comparison to other text based protocols and allows clients to make decisions about load balancing, failover and data location operations.

This example demonstrates how to register a client side CacheListener for the create, remove, modify and expire events.

Prepare a server instance

Simple start a Infinispan 10+ server and change the configuration within the infinispan.xml

...

Note that the authorization has been removed from the default configuration. To let the client run please remove the security for the endpoint as well. It is possible to start 1 or more servers, the code will use the server on localhost with the default port 11222.

 bin/server.sh [-o 100] -n <node name> [-s <server directory>]

Build and Run the examples

  1. Type this command to build :

     mvn clean package
    
  2. Run the client

    Use maven to start one or more clients

      mvn exec:java
    

    This example will add and modify entries with key 0....99. The client output will show that events are received, note that the expired events will happen in chunks if the ExpirationReaper will remove them.

infinispan.playground.remote.listener's People

Contributors

wfink avatar

Watchers

 avatar  avatar

Forkers

durgeshanaokar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.