@Override public Object get(Object key, Object callbackArg, EntryEventImpl clientEvent) { recordTXOperation(ServerRegionOperation.GET, key, callbackArg); return GetOp.execute(this.pool, this.region, key, callbackArg, this.pool.getPRSingleHopEnabled(), clientEvent); }
public void internalClose(boolean keepAlive) throws Exception { try { getConnection().close(keepAlive); } finally { if (updater != null) { updater.close(); } } }
/** * Release use of this pool */ public void detach(boolean keepalive) { this.pool.getRITracker().unregisterRegion(this, keepalive); super.detach(); }
/** * Execute the given op on the given connection. * * @param con the connection to do the execution on * @param op the operation to execute * @return the result of execution if any; null if not */ @Override public Object executeOn(Connection con, Op op) { authenticateIfRequired(con.getServer(), op); return executor.executeOn(con, op); }
public boolean isPrimaryUpdaterAlive() { boolean result = false; QueueConnectionImpl primary = (QueueConnectionImpl) queueConnections.getPrimary(); if (primary != null) { ClientUpdater cu = primary.getUpdater(); if (cu != null) { result = cu.isAlive(); } } return result; }
/** * 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); }
public static Object execute(ExecutablePool pool, String regionName, Object key, Object value, byte[] deltaBytes, EntryEventImpl event, Operation operation, boolean requireOldValue, Object expectedOldValue, Object callbackArg, boolean prSingleHopEnabled) { AbstractOp op = new PutOpImpl(regionName, key, value, deltaBytes, event, operation, requireOldValue, expectedOldValue, callbackArg, false/* donot send full obj; send delta */, prSingleHopEnabled); return pool.execute(op); }
/** * Support for server-side interest registration */ public void removeSingleInterest(Object key, int interestType, boolean isDurable, boolean receiveUpdatesAsInvalidates) { this.pool.getRITracker().removeSingleInterest(this.region, key, interestType, isDurable, receiveUpdatesAsInvalidates); }
@Override protected void endAttempt(ConnectionStats stats, long start) { stats.endClear(start, hasTimedOut(), hasFailed()); } }
@Override protected void endAttempt(ConnectionStats stats, long start) { stats.endCloseCon(start, hasTimedOut(), hasFailed()); } }
@Override protected void endAttempt(ConnectionStats stats, long start) { stats.endRemoveAll(start, hasTimedOut(), hasFailed()); } }
@Override protected void endAttempt(ConnectionStats stats, long start) { stats.endUnregisterInterest(start, hasTimedOut(), hasFailed()); } }
void connectionCrashed(Connection con) { // the endpoint has not crashed but this method does all the work // we need to do endpointCrashed(con.getEndpoint()); }
@Override protected void endAttempt(ConnectionStats stats, long start) { stats.endGetEntry(start, hasTimedOut(), hasFailed()); } }
@SuppressWarnings("unchecked") @Override public Region<K, V> create(String name) throws RegionExistsException { return getCache().basicCreateRegion(name, createRegionAttributes()); }
/** * Test hook. Verify if this EventId is already present in the map or not. If it is already * present then return true. * * @param eventId the EventId of the incoming event * @return true if it is already present * @since GemFire 5.1 */ public boolean verifyIfDuplicate(EventID eventId) { return ((QueueStateImpl) this.queueManager.getState()).verifyIfDuplicate(eventId); }
public static void execute(ExecutablePool pool, SerializerAttributesHolder[] holders, EventID eventId) { AbstractOp op = new RegisterDataSerializersOpImpl(holders, eventId); pool.execute(op); }
/** * Get a enum from the given pool. * * @param pool the pool to use to communicate with the server. */ public static EnumInfo execute(ExecutablePool pool, int enumId) { AbstractOp op = new GetPDXEnumByIdOpImpl(enumId); return (EnumInfo) pool.execute(op); }
public EndpointManagerImpl(String poolName, DistributedSystem ds, CancelCriterion cancelCriterion, PoolStats poolStats) { this.ds = ds; this.poolName = poolName; this.cancelCriterion = cancelCriterion; this.poolStats = poolStats; listener.addListener(new EndpointListenerForBridgeMembership()); }
/** * 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); }