Package org.infinispan.server.test.api
Class HotRodTestClientDriver
- java.lang.Object
-
- org.infinispan.server.test.api.HotRodTestClientDriver
-
- All Implemented Interfaces:
org.infinispan.commons.configuration.Self<HotRodTestClientDriver>
public class HotRodTestClientDriver extends Object
REST operations for the testing framework- Since:
- 10
- Author:
- Tristan Tarrant
-
-
Field Summary
Fields Modifier and Type Field Description protected EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag>flagsprotected org.infinispan.configuration.cache.CacheModemodeprotected Stringqualifierprotected org.infinispan.commons.configuration.BasicConfigurationserverConfiguration
-
Constructor Summary
Constructors Constructor Description HotRodTestClientDriver(TestServer testServer, TestClient testClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
org.infinispan.client.hotrod.RemoteCache<K,V>create()Created a cache with the name of the method where this method is being called from.org.infinispan.client.hotrod.RemoteCacheManagercreateRemoteCacheManager()<K,V>
org.infinispan.client.hotrod.RemoteCache<K,V>get()Gets a cache with the name of the method where this method is being called fromSmakeVolatile()HotRodTestClientDriverself()SwithCacheMode(org.infinispan.configuration.cache.CacheMode mode)HotRodTestClientDriverwithClientConfiguration(org.infinispan.client.hotrod.configuration.ConfigurationBuilder clientConfiguration)Provide a custom client configuration to connect to the server.HotRodTestClientDriverwithMarshaller(Class<? extends org.infinispan.commons.marshall.Marshaller> marshallerClass)TheMarshallerto be used by the client.HotRodTestClientDriverwithPort(int port)SwithQualifier(String qualifier)SwithServerConfiguration(org.infinispan.commons.configuration.XMLStringConfiguration xmlConfiguration)SwithServerConfiguration(org.infinispan.configuration.cache.ConfigurationBuilder serverConfiguration)
-
-
-
Field Detail
-
serverConfiguration
protected org.infinispan.commons.configuration.BasicConfiguration serverConfiguration
-
flags
protected EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags
-
mode
protected org.infinispan.configuration.cache.CacheMode mode
-
qualifier
protected String qualifier
-
-
Constructor Detail
-
HotRodTestClientDriver
public HotRodTestClientDriver(TestServer testServer, TestClient testClient)
-
-
Method Detail
-
withClientConfiguration
public HotRodTestClientDriver withClientConfiguration(org.infinispan.client.hotrod.configuration.ConfigurationBuilder clientConfiguration)
Provide a custom client configuration to connect to the server.- Parameters:
clientConfiguration-- Returns:
- the current
HotRodTestClientDriverinstance with the client configuration override
-
withMarshaller
public HotRodTestClientDriver withMarshaller(Class<? extends org.infinispan.commons.marshall.Marshaller> marshallerClass)
TheMarshallerto be used by the client.- Parameters:
marshallerClass-- Returns:
- the current
HotRodTestClientDriverinstance with the Marshaller configuration override
-
withPort
public HotRodTestClientDriver withPort(int port)
-
get
public <K,V> org.infinispan.client.hotrod.RemoteCache<K,V> get()
Gets a cache with the name of the method where this method is being called from- Returns:
RemoteCache, the cache is such exist
-
create
public <K,V> org.infinispan.client.hotrod.RemoteCache<K,V> create()
Created a cache with the name of the method where this method is being called from. If the cache already exists, retrieves the existing cache- Returns:
RemoteCache, the cache
-
createRemoteCacheManager
public org.infinispan.client.hotrod.RemoteCacheManager createRemoteCacheManager()
-
self
public HotRodTestClientDriver self()
-
withServerConfiguration
public S withServerConfiguration(org.infinispan.configuration.cache.ConfigurationBuilder serverConfiguration)
-
withServerConfiguration
public S withServerConfiguration(org.infinispan.commons.configuration.XMLStringConfiguration xmlConfiguration)
-
withCacheMode
public S withCacheMode(org.infinispan.configuration.cache.CacheMode mode)
-
withQualifier
public S withQualifier(String qualifier)
-
makeVolatile
public S makeVolatile()
-
-