public static Object find(SpaceURL spaceURL, CredentialsProvider credentialsProvider, long timeout, LookupType lookupType) throws FinderException { if (spaceURL == null) throw new FinderException(new SpaceURLValidationException("Invalid space url - SpaceURL value must be supplied to this method.")); return spaceFinder.findService(spaceURL, spaceURL.getCustomProperties(), null /*lifeCycle*/, credentialsProvider, timeout, lookupType); }
public static ExternalEntry createExternalEntry(String className, Object[] fieldsValues, ITypeDesc typeDesc) { ExternalEntry ee = new ExternalEntry(); ee.m_ClassName = className; ee.m_FieldsValues = fieldsValues; updateProperties(ee, typeDesc); return ee; }
public void notify(RemoteEvent event) { synchronized (_lock) { if (_leasedIterator.isTerminated()) return; processEvent((EntryArrivedRemoteEvent) event); } }
/** * Gets URL. * * @return entire SpaceFinder URL **/ public String getURL() { return getProperty(URL_NAME); }
@Override public void setEntryInfo(T target, String uid, int version, long ttl) { target.__setEntryInfo(new EntryInfo(uid, version, ttl)); }
/** * Control the de-serialization stream by ourself. **/ private void readObject(ObjectInputStream in) throws IOException { _readExternal(in); }
private static SpaceURL parseURL(String url, Properties customProperties) throws MalformedURLException { if (url == null) throw new SpaceURLValidationException("Invalid space url - SpaceURL value must be supplied to this method."); return SpaceURLParser.parseURL(url, customProperties); }
public boolean isProxyAlive() throws RemoteException { return getProxy().isProxyAlive(); } }
/** * {@inheritDoc} */ public Object getFieldValue(String fieldName) { return getFieldValue(getFieldPosition(fieldName)); }
/** * Return <tt>true</tt> if the integer argument includes the <tt>UPDATE_OR_WRITE</tt> modifier, * <tt>false</tt> otherwise. * * @param mod a set of modifiers * @return <tt>true</tt> if <code>mod</code> includes the <tt>public</tt> modifier; * <tt>false</tt> otherwise. */ public static boolean isUpdateOrWrite(int mod) { return Modifiers.contains(mod, UpdateModifiers.UPDATE_OR_WRITE); }
/** * Returns Either LRMISpaceImpl or SpaceProxyImpl. */ public static IRemoteSpace findJiniSpace(SpaceURL url, String spaceUuid, Properties customProperties, long timeout, LookupType lookupType) throws FinderException { return (IRemoteSpace) findJiniSpace(url, spaceUuid, customProperties, timeout, lookupType, false); }
/** * Entry Version ID. * * @return Returns the Entry Version ID. The version number is incremented each time an entry is * updated. The initial value to be stored in the space is 1, and is incremented after each * update. This value is used when running in optimistic locking mode. */ public int getVersionID() { return getVersion(); }
@Override public long getTimeToLive(T target) { EntryInfo info = target.__getEntryInfo(); if (info != null) return info.m_TimeToLive; return 0; }
protected Object findService(String url, Properties customProperties, LifeCycle lifeCycle, CredentialsProvider credentialsProvider) throws FinderException { if (url == null) throw new FinderException(new SpaceURLValidationException("Invalid space url - SpaceURL value must be supplied to this method.")); StringTokenizer st = new StringTokenizer(url, ";"); String[] urls = new String[st.countTokens()]; for (int i = 0; st.hasMoreTokens(); i++) urls[i] = st.nextToken(); SpaceURL[] spaceURLs = prepareUrl(urls, customProperties); Properties customProps = spaceURLs[spaceURLs.length - 1].getCustomProperties(); return findService(spaceURLs, customProps, lifeCycle, credentialsProvider); }
/** * Checks if the EXCLUSIVE_READ_LOCK bit was set for this modifier. * * @param mod a set of modifiers * @return <code>true</code> if <code>mod</code> includes the {@link #EXCLUSIVE_READ_LOCK} bit * is set. */ public static boolean isExclusiveReadLock(int mod) { return Modifiers.contains(mod, EXCLUSIVE_READ_LOCK); }
/** * Checks if the FIFO bit was set for this modifier. * * @param mod a set of modifiers * @return <tt>true</tt> if <code>mod</code> includes the <tt>FIFO</tt> modifier; <tt>false</tt> * otherwise. */ public static boolean isFifo(int mod) { return Modifiers.contains(mod, FIFO); }
/** * Checks if the FIFO_GROUPING_POLL bit was set for this modifier. * * @param mod a set of modifiers * @return <tt>true</tt> if <code>mod</code> includes the <tt>FIFO_GROUPING_POLL</tt> modifier; * <tt>false</tt> otherwise. */ public static boolean isFifoGroupingPoll(int mod) { return Modifiers.contains(mod, FIFO_GROUPING_POLL); }
/** * Checks if the MEMORY_ONLY_SEARCH bit was set for this modifier. * * @param mod a set of modifiers * @return <tt>true</tt> if <code>mod</code> includes the <tt>MEMORY_ONLY_SEARCH</tt> modifier; * <tt>false</tt> otherwise. * @since 9.0.1 */ public static boolean isMemoryOnlySearch(int mod) { return Modifiers.contains(mod, MEMORY_ONLY_SEARCH); } }
/** * Checks if the DIRTY_READ bit was set for this modifier. * * @param mod a set of modifiers * @return <code>true</code> if <code>mod</code> includes the {@link #DIRTY_READ} bit is set. */ public static boolean isDirtyRead(int mod) { return Modifiers.contains(mod, DIRTY_READ); }