public String getHostAddress() { if(_id != null && _id.getDistributedMember() != null) return _id.getDistributedMember().getHost(); return null; }
public String getHostAddress() { if(_id != null && _id.getDistributedMember() != null) return _id.getDistributedMember().getHost(); return null; }
public String getDSMembership() { if (identity == null) { // some unit tests create IDs that have no real identity, so return null return "null"; } // don't cache if we haven't connected to the server yet if (((InternalDistributedMember)getDistributedMember()).getPort() == 0) { return getDistributedMember().toString(); } if (memberIdString == null) { memberIdString = getDistributedMember().toString(); } return memberIdString; }
public String getDSMembership() { if (identity == null) { // some unit tests create IDs that have no real identity, so return null return "null"; } // don't cache if we haven't connected to the server yet if (((InternalDistributedMember)getDistributedMember()).getPort() == 0) { return getDistributedMember().toString(); } if (memberIdString == null) { memberIdString = getDistributedMember().toString(); } return memberIdString; }
/** * Returns this <code>ClientProxyMembershipID</code>'s durable attributes. * @return this <code>ClientProxyMembershipID</code>'s durable attributes * * @since 5.5 */ protected DurableClientAttributes getDurableAttributes() { return getDistributedMember().getDurableClientAttributes(); }
/** * Returns this <code>ClientProxyMembershipID</code>'s durable attributes. * @return this <code>ClientProxyMembershipID</code>'s durable attributes * * @since 5.5 */ protected DurableClientAttributes getDurableAttributes() { return getDistributedMember().getDurableClientAttributes(); }
public Version getClientVersion() { return ((InternalDistributedMember)getDistributedMember()).getVersionObject(); }
/** * Returns whether this <code>ClientProxyMembershipID</code> is durable. * @return whether this <code>ClientProxyMembershipID</code> is durable * * @since 5.5 */ public boolean isDurable() { String durableClientId = getDistributedMember().getDurableClientAttributes().getId(); return durableClientId != null && !(durableClientId.length() == 0); }
/** * Returns whether this <code>ClientProxyMembershipID</code> is durable. * @return whether this <code>ClientProxyMembershipID</code> is durable * * @since 5.5 */ public boolean isDurable() { String durableClientId = getDistributedMember().getDurableClientAttributes().getId(); return durableClientId != null && !(durableClientId.length() == 0); }
public AuthorizeRequest(String authzFactoryName, ClientProxyMembershipID id, Principal principal, Cache cache) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, NotAuthorizedException { this(authzFactoryName, id.getDistributedMember(), principal, cache); this.id = id; if (this.logger.infoEnabled()) { this.logger.info( LocalizedStrings.AuthorizeRequest_AUTHORIZEREQUEST_CLIENT_0_IS_SETTING_AUTHORIZATION_CALLBACK_TO_1, new Object[] {id, authzFactoryName}); } }
@Override public String toString() { if (this.identity != null && ((InternalDistributedMember)getDistributedMember()).getPort() == 0) { return this.toStringNoCache(); } if (this._toString == null) { this._toString = this.toStringNoCache(); } return this._toString; }
@Override public String toString() { if (this.identity != null && ((InternalDistributedMember)getDistributedMember()).getPort() == 0) { return this.toStringNoCache(); } if (this._toString == null) { this._toString = this.toStringNoCache(); } return this._toString; }
public Principal verifyCredentials() throws AuthenticationRequiredException, AuthenticationFailedException { String methodName = this.system.getProperties().getProperty( DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); return verifyCredentials(methodName, this.credentials, this.system .getSecurityProperties(), (InternalLogWriter)this.system.getLogWriter(), (InternalLogWriter)this.system .getSecurityLogWriter(), this.id.getDistributedMember()); }
public Principal verifyCredentials() throws AuthenticationRequiredException, AuthenticationFailedException { String methodName = this.system.getProperties().getProperty( DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); return verifyCredentials(methodName, this.credentials, this.system .getSecurityProperties(), this.system.getLogWriter(), this.system .getSecurityLogWriter(), this.id.getDistributedMember()); }
public void basicBridgeDestroyRegion( Object p_callbackArg, final ClientProxyMembershipID client, boolean fromClient, EventID eventId) throws TimeoutException, EntryExistsException, CacheWriterException { Object callbackArg = p_callbackArg; //long startPut = CachePerfStats.getStatTime(); if (fromClient) { // If this region is also wan-enabled, then wrap that callback arg in a // GatewayEventCallbackArgument to store the event id. if(isGatewaySenderEnabled()) { callbackArg = new GatewaySenderEventCallbackArgument(callbackArg); } } RegionEventImpl event = new ClientRegionEventImpl(this, Operation.REGION_DESTROY, callbackArg,false, client.getDistributedMember(), client/* context */, eventId); basicDestroyRegion(event, true); }
public void basicBridgeClear( Object p_callbackArg, final ClientProxyMembershipID client, boolean fromClient, EventID eventId) throws TimeoutException, EntryExistsException, CacheWriterException { Object callbackArg = p_callbackArg; //long startPut = CachePerfStats.getStatTime(); if (fromClient) { // If this region is also wan-enabled, then wrap that callback arg in a // GatewayEventCallbackArgument to store the event id. if(isGatewaySenderEnabled()) { callbackArg = new GatewaySenderEventCallbackArgument(callbackArg); } } RegionEventImpl event = new ClientRegionEventImpl(this, Operation.REGION_CLEAR, callbackArg,false, client.getDistributedMember(), client/* context */, eventId); basicClear(event, true); }
/** * Convert a ClientProxyMembershipID distribted member ID array into one * usable by EventIDs * @param client the client's ID * @return a byte array that may be used in EventID formation */ public static byte[] getMembershipId(ClientProxyMembershipID client) { try { HeapDataOutputStream hdos = new HeapDataOutputStream(256, Version.CURRENT); ((InternalDistributedMember)client.getDistributedMember()).writeEssentialData(hdos); return hdos.toByteArray(); } catch (IOException ioe) { throw new InternalGemFireException(LocalizedStrings.ClientProxyMembershipID_UNABLE_TO_SERIALIZE_IDENTITY.toLocalizedString(), ioe); } }
/** * Convert a ClientProxyMembershipID distribted member ID array into one * usable by EventIDs * @param client the client's ID * @return a byte array that may be used in EventID formation */ public static byte[] getMembershipId(ClientProxyMembershipID client) { try { HeapDataOutputStream hdos = new HeapDataOutputStream(256, Version.CURRENT); ((InternalDistributedMember)client.getDistributedMember()).writeEssentialData(hdos); return hdos.toByteArray(); } catch (IOException ioe) { throw new InternalGemFireException(LocalizedStrings.ClientProxyMembershipID_UNABLE_TO_SERIALIZE_IDENTITY.toLocalizedString(), ioe); } }
protected static void writeCommitResponse(TXCommitMessage response, Message origMsg, ServerConnection servConn) throws IOException { Message responseMsg = servConn.getResponseMessage(); responseMsg.setMessageType(MessageType.RESPONSE); responseMsg.setTransactionId(origMsg.getTransactionId()); responseMsg.setNumberOfParts(1); if( response != null ) { response.setClientVersion(servConn.getClientVersion()); } responseMsg.addObjPart(response, zipValues); servConn.getCache().getCancelCriterion().checkCancelInProgress(null); if (logger.isDebugEnabled()) { logger.debug("TX: sending a nonNull response for transaction: {}", new TXId((InternalDistributedMember) servConn.getProxyID().getDistributedMember(), origMsg.getTransactionId())); } responseMsg.send(servConn); origMsg.clearParts(); }
public void basicBridgeUpdateVersionStamp(Object key, Object p_callbackArg, ClientProxyMembershipID memberId, boolean fromClient, EntryEventImpl clientEvent) { // Create an event and update version stamp of the entry EntryEventImpl event = EntryEventImpl.create(this, Operation.UPDATE_VERSION_STAMP, key, null /* new value */, null /*callbackArg*/, false /* origin remote */, memberId.getDistributedMember(), false /* generateCallbacks */, clientEvent.getEventId()); event.setContext(memberId); // if this is a replayed operation we may already have a version tag event.setVersionTag(clientEvent.getVersionTag()); try { basicUpdateEntryVersion(event); } finally { clientEvent.setVersionTag(event.getVersionTag()); clientEvent.isConcurrencyConflict(event.isConcurrencyConflict()); event.release(); } }