@Override public void writeObject(ObjectOutput output, FuzzyQuery object) throws IOException { output.writeObject(object.getTerm()); output.writeInt(object.getPrefixLength()); output.writeBoolean(object.getTranspositions()); output.writeInt(object.getMaxEdits()); output.writeInt((int) getValue(object, MAX_EXPANSIONS_FIELD)); }
private void startProtocolServer(ProtocolServerConfiguration configuration) throws StartException { // Start the server and record it ProtocolServer server; try { server = serverClass.newInstance(); } catch (Exception e) { throw ROOT_LOGGER.failedConnectorInstantiation(e, serverName); } ROOT_LOGGER.connectorStarting(serverName); configuration.ignoredCaches().forEach(server::ignoreCache); SecurityActions.startProtocolServer(server, configuration, getCacheManager().getValue()); protocolServer = server; try { transport = (Transport) ReflectionUtil.getValue(protocolServer, "transport"); } catch (Exception e) { throw ROOT_LOGGER.failedTransportInstantiation(e.getCause(), serverName); } }
@BeforeClass public void createCacheStore() throws PersistenceException { ConfigurationBuilder builder = TestCacheManagerFactory.getDefaultCacheConfiguration(false); JdbcStringBasedStoreConfigurationBuilder storeBuilder = createJdbcConfig(builder); UnitTestDatabaseManager.buildTableManipulation(storeBuilder.table()); UnitTestDatabaseManager.configureUniqueConnectionFactory(storeBuilder); cacheStore = new JdbcStringBasedStore(); marshaller = new TestObjectStreamMarshaller(); cacheStore.init(PersistenceMockUtil.createContext(getClass().getSimpleName(), builder.build(), marshaller)); cacheStore.start(); tableManager = (TableManager) ReflectionUtil.getValue(cacheStore, "tableManager"); }