use of org.openntf.domino.ViewEntry in project org.openntf.domino by OpenNTF.
the class DominoGraph method getEdges.
@Override
public Iterable<Edge> getEdges() {
FastSet<Edge> result = new FastSet<Edge>();
ViewEntryCollection vec = getEdgeView().getAllEntries();
for (ViewEntry entry : vec) {
result.add(getEdge(entry.getUniversalID()));
}
return result.unmodifiable();
}
use of org.openntf.domino.ViewEntry in project org.openntf.domino by OpenNTF.
the class MassViewNavigatorTest method run.
@Test
public void run() {
Session s = Factory.getSession(SessionType.CURRENT);
Database source = s.getDatabase("", TARGET, true);
View view = source.getView(VIEW);
System.out.println("-- START --");
long start = System.nanoTime();
if (null != view) {
view.setAutoUpdate(false);
System.out.println(view.getEntryCount());
ViewNavigator nav = view.createViewNav();
nav.setCacheSize(400);
System.out.println("CacheSize: " + nav.getCacheSize());
view.setAutoUpdate(true);
ViewEntry entry = null;
entry = nav.getFirst();
while (null != entry) {
entry = nav.getNext(entry);
}
}
long elapsed = System.nanoTime() - start;
System.out.println("-- STOP --");
System.out.println("Thread " + Thread.currentThread().getName() + " elapsed time: " + elapsed / 1000000 + "ms");
}
use of org.openntf.domino.ViewEntry in project org.openntf.domino by OpenNTF.
the class DCategoryVertex method checkSkipCategory.
public static boolean checkSkipCategory(final ViewNavigator nav) {
// System.out.println("TEMP DEBUG Checking Skip Category...");
boolean result = false;
ViewEntry first = nav.getFirst();
if (first == null) {
return false;
}
if (first.isCategory()) {
ViewEntry second = nav.getNextSibling(first);
if (second == null) {
result = true;
}
}
nav.gotoFirst();
return result;
}
use of org.openntf.domino.ViewEntry in project org.openntf.domino by OpenNTF.
the class RawMessageProviderDBImpl method buildMsgCache.
/*----------------------------------------------------------------------------*/
private void buildMsgCache() {
iMsgCache = new TreeMap<String, Map<String, Map<String, String>>>();
/*
* To avoid PANIC-s from WrapperFactory.recacheLotusObject (when buildMsgCache is called again),
* this was partly modified
*/
try {
if (iDB == null) {
if (iDBPath == null)
return;
Session s = Factory.getSession_unchecked(SessionType.CURRENT);
if (s == null || (iDB = s.getDatabase(iDBServer, iDBPath)) == null) {
System.err.println("RawMessageProviderDBImpl: Can't open DB " + iDBServer + "!!" + iDBPath);
return;
}
}
View v = iDB.getView(iLookupView);
if (v == null)
return;
v.setAutoUpdate(false);
ViewNavigator nav = v.createViewNav();
for (ViewEntry ve = nav.getFirst(); ve != null; ve = nav.getNext()) oneDBMsgText(ve);
} catch (Throwable t) {
t.printStackTrace();
} finally {
iDB = null;
}
}
use of org.openntf.domino.ViewEntry in project org.openntf.domino by OpenNTF.
the class MassViewEntryCollectionTest method run.
@Test
public void run() {
Session s = Factory.getSession(SessionType.CURRENT);
Database source = s.getDatabase("", TARGET, true);
View view = source.getView(VIEW);
System.out.println("-- START --");
long start = System.nanoTime();
int i = 0;
if (null != view) {
view.setAutoUpdate(false);
System.out.println(view.getEntryCount());
for (ViewEntry entry : view.getAllEntries()) {
i++;
}
/* */
view.setAutoUpdate(true);
}
System.out.println(i);
long elapsed = System.nanoTime() - start;
System.out.println("-- STOP --");
System.out.println("Thread " + Thread.currentThread().getName() + " elapsed time: " + elapsed / 1000000 + "ms");
}
Aggregations