org.infinispan.client.hotrod.impl
Interface HotrodOperations

All Known Implementing Classes:
HotrodOperationsImpl

public interface HotrodOperations

// TODO: Document this - TODO - add timeout support - TODO - enforce encoding and add such tests

Since:
4.1
Author:
mmarkus

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.
 boolean ping()
           
 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()

ping

boolean ping()

Google Analytics

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