/** * Ping the specified server to see if it is still alive * * @param pool the pool to use to communicate with the server. * @param server the server to do the execution on */ public static void execute(ExecutablePool pool, ServerLocation server) { AbstractOp op = new PingOpImpl(); pool.executeOn(server, op, false, false); }
/** * Close a continuous query on the given server using connections from the given pool to * communicate with the server. * * @param pool the pool to use to communicate with the server. * @param cqName name of the CQ to close */ public static void execute(ExecutablePool pool, String cqName) { AbstractOp op = new CloseCQOpImpl(cqName); pool.executeOnAllQueueServers(op); }
/** * Retrieves all durable continuous queries on the server using connections from the given pool to * communicate with the server. * * @param pool the pool to use to communicate with the server. */ public static List<String> execute(ExecutablePool pool) { AbstractOp op = new GetDurableCQsOpImpl(); return (List<String>) pool.executeOnPrimary(op); }
&& poolImpl.getConnectionCount() >= poolImpl.getMaxConnections()) ? true : false); op.setAllowDuplicateMetadataRefresh(!onlyUseExistingCnx); return pool.executeOn(server, op, true, onlyUseExistingCnx); } catch (AllConnectionsInUseException e) { } catch (ServerConnectivityException e) { return pool.execute(op);
/** * Register a bunch of instantiators on a server using connections from the given pool to * communicate with the server. * * @param pool the pool to use to communicate with the server. */ public static int execute(ExecutablePool pool, EnumInfo ei) { AbstractOp op = new GetPDXIdForEnumOpImpl(ei); return ((Integer) pool.execute(op)).intValue(); }
/** * Stop a continuous query on the server using connections from the given pool to communicate with * the server. * * @param pool the pool to use to communicate with the server. * @param cqName name of the CQ to stop */ public static void execute(ExecutablePool pool, String cqName) { AbstractOp op = new StopCQOpImpl(cqName); pool.executeOnQueuesAndReturnPrimaryResult(op); }
&& poolImpl.getConnectionCount() >= poolImpl.getMaxConnections()) ? true : false); op.setAllowDuplicateMetadataRefresh(!onlyUseExistingCnx); return pool.executeOn(new ServerLocation(server.getHostName(), server.getPort()), op, true, onlyUseExistingCnx); } catch (AllConnectionsInUseException e) { return pool.execute(op);
/** * Register a bunch of instantiators on a server using connections from the given pool to * communicate with the server. * * @param pool the pool to use to communicate with the server. */ public static int execute(ExecutablePool pool, PdxType type) { AbstractOp op = new GetPDXIdForTypeOpImpl(type); return ((Integer) pool.execute(op)).intValue(); }
/** * Create a continuous query on the server using connections from the given pool to communicate * with the server. * * @param pool the pool to use to communicate with the server. * @param cqName name of the CQ to create * @param queryStr string OQL statement to be executed * @param cqState int cqState to be set. * @param isDurable true if CQ is durable * @param regionDataPolicy the data policy ordinal of the region */ public static Object execute(ExecutablePool pool, String cqName, String queryStr, int cqState, boolean isDurable, byte regionDataPolicy) { AbstractOp op = new CreateCQOpImpl(cqName, queryStr, cqState, isDurable, regionDataPolicy); return pool.executeOnQueuesAndReturnPrimaryResult(op); }
public static Object executeOn(ServerLocation location, ExecutablePool pool, Properties securityProps, boolean keepAlive) { AbstractOp op = new ProxyCacheCloseOpImpl(pool, securityProps, keepAlive); return pool.executeOn(location, op); }
&& poolImpl.getConnectionCount() >= poolImpl.getMaxConnections()) ? true : false); op.setAllowDuplicateMetadataRefresh(!onlyUseExistingCnx); return pool.executeOn(new ServerLocation(server.getHostName(), server.getPort()), op, true, onlyUseExistingCnx); } catch (AllConnectionsInUseException e) { Object result = pool.execute(op); if (op.getMessage().isRetry()) { event.setRetried(true);
/** * Does a region entry keySet on a server using connections from the given pool to communicate * with the server. * * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the entry keySet on */ public static Set execute(ExecutablePool pool, String region) { AbstractOp op = new KeySetOpImpl(region); return (Set) pool.execute(op); }
/** * Create a continuous query on the server using connections from the given pool to communicate * with the server. * * @param pool the pool to use to communicate with the server. * @param cqName name of the CQ to create * @param queryStr string OQL statement to be executed * @param cqState int cqState to be set. * @param isDurable true if CQ is durable * @param regionDataPolicy the data policy ordinal of the region */ public static SelectResults execute(ExecutablePool pool, String cqName, String queryStr, int cqState, boolean isDurable, byte regionDataPolicy) { AbstractOp op = new CreateCQWithIROpImpl(cqName, queryStr, cqState, isDurable, regionDataPolicy); return (SelectResults) pool.executeOnQueuesAndReturnPrimaryResult(op); }
/** * Does a region unregisterInterestList on a server using connections from the given pool to * communicate with the server. * * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the unregisterInterestList on * @param keys list of keys we are interested in * @param isClosing true if this unregister is done by a close * @param keepAlive true if this unregister should not undo a durable registration */ public static void execute(ExecutablePool pool, String region, List keys, boolean isClosing, boolean keepAlive) { AbstractOp op = new UnregisterInterestListOpImpl(region, keys, isClosing, keepAlive); pool.executeOnAllQueueServers(op); }
/** * Does a get on the primary server using connections from the given pool * * @param pool the pool to use to communicate with the server. * @param event the eventid to do the get on * @param callbackArg an optional callback arg to pass to any cache callbacks * @return the entry value found by the get if any */ public static Object executeOnPrimary(ExecutablePool pool, EventID event, Object callbackArg) { AbstractOp op = new GetEventValueOpImpl(event, callbackArg); return pool.executeOnPrimary(op); }
/** * Tell the given server to become the primary host of a server-to-client queue * * @param pool the pool to use to communicate with the server. * @param conn the connection to do the execution on * @param sentClientReady true if the client ready message has already been sent */ public static void execute(ExecutablePool pool, Connection conn, boolean sentClientReady) { AbstractOp op = new MakePrimaryOpImpl(sentClientReady); pool.executeOn(conn, op); }
/** * Register a bunch of instantiators on a server using connections from the given pool to * communicate with the server. * * @param pool the pool to use to communicate with the server. */ public static void execute(ExecutablePool pool, int id, PdxType type) { AbstractOp op = new AddPDXTypeOpImpl(id, type); pool.execute(op); }
/** * Does a region registerInterestList on a server using connections from the given pool to * communicate with the server. * * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the registerInterestList on * @param keys list of keys we are interested in * @param policy the interest result policy for this registration * @param isDurable true if this registration is durable * @param regionDataPolicy the data policy ordinal of the region * @return list of keys */ public static List execute(ExecutablePool pool, String region, List keys, InterestResultPolicy policy, boolean isDurable, boolean receiveUpdatesAsInvalidates, byte regionDataPolicy) { AbstractOp op = new RegisterInterestListOpImpl(region, keys, policy, isDurable, receiveUpdatesAsInvalidates, regionDataPolicy); return (List) pool.executeOnQueuesAndReturnPrimaryResult(op); }
/** * Does a region unregisterInterest on a server using connections from the given pool to * communicate with the server. * * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the unregisterInterest on * @param key describes what we are no longer interested in * @param interestType the {@link InterestType} for this unregister * @param isClosing true if this unregister is done by a close * @param keepAlive true if this unregister should not undo a durable registration */ public static void execute(ExecutablePool pool, String region, Object key, int interestType, boolean isClosing, boolean keepAlive) { AbstractOp op = new UnregisterInterestOpImpl(region, key, interestType, isClosing, keepAlive); pool.executeOnAllQueueServers(op); }
/** * Send the primary server acknowledgement on the events this client has received and processed * from it using connections from the given pool to communicate with the server. * * @param pool the pool to use to communicate with the server. * @param events list of events to acknowledge */ public static void execute(Connection connection, ExecutablePool pool, List events) { AbstractOp op = new PrimaryAckOpImpl(events); pool.executeOn(connection, op); }