org.infinispan.client.hotrod.impl.protocol
Interface HotRodOperations


public interface HotRodOperations

Defines the Hot Rod operations as described in the protocol spec: http://community.jboss.org/wiki/HotRodProtocol

Since:
4.1
Author:
Mircea.Markus@jboss.com

Method Summary
 void clear(Flag... flags)
           
 boolean containsKey(byte[] key, Flag... flags)
           
 byte[] get(byte[] key, Flag... flags)
           
 BinaryVersionedValue getWithVersion(byte[] key, Flag... flags)
          Returns null if the given key does not exist.
 byte[] put(byte[] key, byte[] value, int lifespan, int maxIdle, Flag... flags)
           
 byte[] putIfAbsent(byte[] key, byte[] value, int lifespan, int maxIdle, Flag... flags)
           
 byte[] remove(byte[] key, Flag... flags)
           
 VersionedOperationResponse removeIfUnmodified(byte[] key, long version, Flag... flags)
           
 byte[] replace(byte[] key, byte[] value, int lifespan, int maxIdle, Flag... flags)
           
 VersionedOperationResponse replaceIfUnmodified(byte[] key, byte[] value, int lifespan, int maxIdle, long version, Flag... flags)
           
 Map<String,String> stats()
           
 

Method Detail

get

byte[] get(byte[] key,
           Flag... flags)

remove

byte[] remove(byte[] key,
              Flag... flags)

containsKey

boolean containsKey(byte[] key,
                    Flag... flags)

getWithVersion

BinaryVersionedValue getWithVersion(byte[] key,
                                    Flag... flags)
Returns null if the given key does not exist.


put

byte[] put(byte[] key,
           byte[] value,
           int lifespan,
           int maxIdle,
           Flag... flags)
Parameters:
lifespan - number of seconds that a entry during which the entry is allowed to life. If number of seconds is bigger than 30 days, this number of seconds is treated as UNIX time and so, represents the number of seconds since 1/1/1970. If set to 0, lifespan is unlimited.
maxIdle - Number of seconds that a entry can be idle before it's evicted from the cache. If 0, no max
flags -

putIfAbsent

byte[] putIfAbsent(byte[] key,
                   byte[] value,
                   int lifespan,
                   int maxIdle,
                   Flag... flags)
Parameters:
lifespan - same as in put(byte[],byte[],int,int,org.infinispan.client.hotrod.Flag...)
maxIdle - same as in put(byte[],byte[],int,int,org.infinispan.client.hotrod.Flag...)
flags -

replace

byte[] replace(byte[] key,
               byte[] value,
               int lifespan,
               int maxIdle,
               Flag... flags)
Parameters:
lifespan - same as in put(byte[],byte[],int,int,org.infinispan.client.hotrod.Flag...)
maxIdle - same as in put(byte[],byte[],int,int,org.infinispan.client.hotrod.Flag...)
flags -

replaceIfUnmodified

VersionedOperationResponse replaceIfUnmodified(byte[] key,
                                               byte[] value,
                                               int lifespan,
                                               int maxIdle,
                                               long version,
                                               Flag... flags)
Parameters:
lifespan - same as in put(byte[],byte[],int,int,org.infinispan.client.hotrod.Flag...)
maxIdle - same as in put(byte[],byte[],int,int,org.infinispan.client.hotrod.Flag...)
flags -

removeIfUnmodified

VersionedOperationResponse removeIfUnmodified(byte[] key,
                                              long version,
                                              Flag... flags)

clear

void clear(Flag... flags)

stats

Map<String,String> stats()

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.