/** * Sends the auth credentials to the server. Used in single user mode of authentication. * * @param con The connection to use for this operation. * @param pool The connection pool to use for this operation. * @return Object unique user-id. */ public static Object executeOn(Connection con, ExecutablePool pool) { AbstractOp op = new AuthenticateUserOpImpl(con, pool); return pool.executeOn(con, op); }
/** * 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); }
public static Object executeOn(ServerLocation location, ExecutablePool pool, Properties securityProps, boolean keepAlive) { AbstractOp op = new ProxyCacheCloseOpImpl(pool, securityProps, keepAlive); return pool.executeOn(location, 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); }
/** * 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); }
public static Object executeOn(Connection con, ExecutablePool pool) { AbstractOp op = new GatewaySenderGFEBatchOpImpl(); return pool.executeOn(con, op, true/* timeoutFatal */); }
/** * Tells the primary server we are ready to receive server-to-client events from durable * subscriptions. * * @param pool the pool to use to communicate with the server. */ public static void execute(ExecutablePool pool, QueueConnectionImpl primary) { AbstractOp op = new ReadyForEventsOpImpl(); pool.executeOn(primary, op); }
/** * Sends the auth credentials to the server for a particular user. Used in multiple user mode of * authentication. * * @param location The ServerLocation instance whose connection instance will be used to perform * the operation. * @param pool The connection pool to use for this operation. * @return Object unique user-id. */ public static Object executeOn(ServerLocation location, ExecutablePool pool, Properties securityProps) { AbstractOp op = new AuthenticateUserOpImpl(pool, securityProps); return pool.executeOn(location, op); }
/** * Does a region clear on a server using the given connection from the given pool to communicate * with the server. * * @param con the connection to use to send to the server * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the clear on * @param eventId the event id for this clear * @param callbackArg an optional callback arg to pass to any cache callbacks */ public static void execute(Connection con, ExecutablePool pool, String region, EventID eventId, Object callbackArg) { AbstractOp op = new ClearOpImpl(region, eventId, callbackArg); pool.executeOn(con, op); }
/** * Does a region destroyRegion on a server using the given connection to communicate with the * server. * * @param con the connection to use to send to the server * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the destroyRegion on * @param eventId the event id for this destroyRegion * @param callbackArg an optional callback arg to pass to any cache callbacks */ public static void execute(Connection con, ExecutablePool pool, String region, EventID eventId, Object callbackArg) { AbstractOp op = new DestroyRegionOpImpl(region, eventId, callbackArg); pool.executeOn(con, op); }
/** * Does a region entry destroy on a server using the given connection to communicate with the * server. * * @param con the connection to use to send to the server * @param pool the pool to use to communicate with the server. * @param region the region to do the entry destroy on * @param key the entry key to do the destroy on * @param event the event for this destroy operation * @param callbackArg an optional callback arg to pass to any cache callbacks */ public static void execute(Connection con, ExecutablePool pool, String region, Object key, Object expectedOldValue, Operation operation, EntryEventImpl event, Object callbackArg) { AbstractOp op = new DestroyOpImpl(region, key, expectedOldValue, operation, event, callbackArg); pool.executeOn(con, op); }
/** * Create a continuous query on the server using a specific connections from the given pool. * * @param pool the pool to use to communicate with the server. * @param conn the actual connection to use * @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 executeOn(ExecutablePool pool, Connection conn, String cqName, String queryStr, int cqState, boolean isDurable, byte regionDataPolicy) { AbstractOp op = new CreateCQOpImpl(cqName, queryStr, cqState, isDurable, regionDataPolicy); return pool.executeOn(conn, op); }
/** * This is a unit test method. It does a region put on a server using the given connection from * the given pool to communicate with the server. Do not call this method if the value is Delta * instance. * * @param con the connection to use * @param pool the pool to use to communicate with the server. * @param regionName the name of the region to do the put on * @param key the entry key to do the put on * @param value the entry value to put * @param event the event for this put * @param callbackArg an optional callback arg to pass to any cache callbacks */ public static void execute(Connection con, ExecutablePool pool, String regionName, Object key, Object value, EntryEventImpl event, Object callbackArg, boolean prSingleHopEnabled) { AbstractOp op = new PutOpImpl(regionName, key, value, null, event, Operation.CREATE, false, null, callbackArg, false /* donot send full Obj; send delta */, prSingleHopEnabled); pool.executeOn(con, op); }
/** * Does a region registerInterest on a server using connections from the given pool to communicate * with the given server location. * * @param conn the connection to do the register interest on. * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the registerInterest on * @param key describes what we are interested in * @param interestType the {@link InterestType} for this registration * @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 executeOn(Connection conn, ExecutablePool pool, String region, Object key, int interestType, InterestResultPolicy policy, boolean isDurable, boolean receiveUpdatesAsInvalidates, byte regionDataPolicy) { AbstractOp op = new RegisterInterestOpImpl(region, key, interestType, policy, isDurable, receiveUpdatesAsInvalidates, regionDataPolicy); return (List) pool.executeOn(conn, op); }
/** * Does a region registerInterestList on a server using connections from the given pool to * communicate with the given server location. * * @param sl the server to do the register interest on. * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the registerInterest on * @param keys describes what 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 executeOn(ServerLocation sl, 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.executeOn(sl, op); }
/** * Does a region registerInterestList on a server using connections from the given pool to * communicate with the given server location. * * @param conn the connection to do the register interest on. * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the registerInterest on * @param keys describes what 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 executeOn(Connection conn, 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.executeOn(conn, op); }
/** * Does a region registerInterest on a server using connections from the given pool to communicate * with the given server location. * * @param sl the server to do the register interest on. * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the registerInterest on * @param key describes what we are interested in * @param interestType the {@link InterestType} for this registration * @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 executeOn(ServerLocation sl, ExecutablePool pool, String region, Object key, int interestType, InterestResultPolicy policy, boolean isDurable, boolean receiveUpdatesAsInvalidates, byte regionDataPolicy) { AbstractOp op = new RegisterInterestOpImpl(region, key, interestType, policy, isDurable, receiveUpdatesAsInvalidates, regionDataPolicy); return (List) pool.executeOn(sl, op); }
/** * Send a list of gateway events to a server to execute using connections from the given pool to * communicate with the server. * * @param con the connection to send the message on. * @param pool the pool to use to communicate with the server. * @param events list of gateway events * @param batchId the ID of this batch * @param removeFromQueueOnException true if the events should be processed even after some * exception */ public static void executeOn(Connection con, ExecutablePool pool, List events, int batchId, boolean removeFromQueueOnException, boolean isRetry) { AbstractOp op = null; // System.out.println("Version: "+con.getWanSiteVersion()); // Is this check even needed anymore? It looks like we just create the same exact op impl with // the same parameters... if (Version.GFE_651.compareTo(con.getWanSiteVersion()) >= 0) { op = new GatewaySenderGFEBatchOpImpl(events, batchId, removeFromQueueOnException, con.getDistributedSystemId(), isRetry); } else { // Default should create a batch of server version (ACCEPTOR.VERSION) op = new GatewaySenderGFEBatchOpImpl(events, batchId, removeFromQueueOnException, con.getDistributedSystemId(), isRetry); } pool.executeOn(con, op, true/* timeoutFatal */); }
&& poolImpl.getConnectionCount() >= poolImpl.getMaxConnections()) ? true : false); op.setAllowDuplicateMetadataRefresh(!onlyUseExistingCnx); return pool.executeOn(server, op, true, onlyUseExistingCnx); } catch (AllConnectionsInUseException e) { } catch (ServerConnectivityException e) {
&& poolImpl.getConnectionCount() >= poolImpl.getMaxConnections()) ? true : false); op.setAllowDuplicateMetadataRefresh(!onlyUseExistingCnx); return pool.executeOn(new ServerLocation(server.getHostName(), server.getPort()), op, true, onlyUseExistingCnx); } catch (AllConnectionsInUseException e) {