Ejemplo n.º 1
0
 public void commit() {
   preCommit();
   if (isSystemTransaction()) {
     _client.write(Msg.COMMIT_SYSTEMTRANS);
   } else {
     _client.write(Msg.COMMIT.getWriter(this));
     _client.expectedResponse(Msg.OK);
   }
 }
Ejemplo n.º 2
0
 public boolean delete(ObjectReference ref, int id, int cascade) {
   if (!super.delete(ref, id, cascade)) {
     return false;
   }
   MsgD msg = Msg.TA_DELETE.getWriterForInts(this, new int[] {id, cascade});
   _client.writeBatchedMessage(msg);
   return true;
 }
Ejemplo n.º 3
0
 public void processDeletes() {
   Visitor4 deleteVisitor =
       new Visitor4() {
         public void visit(Object a_object) {
           DeleteInfo info = (DeleteInfo) a_object;
           if (info._reference != null) {
             _objectRefrencesToGC =
                 Tree.add(_objectRefrencesToGC, new TreeIntObject(info._key, info._reference));
           }
         }
       };
   traverseDelete(deleteVisitor);
   _client.writeBatchedMessage(Msg.PROCESS_DELETES);
 }
Ejemplo n.º 4
0
 public void useDefaultTransactionTimestamp() {
   _client.writeMsg(Msg.USE_DEFAULT_TRANSACTION_TIMESTAMP, true);
 }
Ejemplo n.º 5
0
 public long generateTransactionTimestamp(long forcedTimeStamp) {
   _client.writeMsg(
       Msg.GENERATE_TRANSACTION_TIMESTAMP.getWriterForLong(this, forcedTimeStamp), true);
   return _client.expectedBufferResponse(Msg.GENERATE_TRANSACTION_TIMESTAMP).readLong();
 }
Ejemplo n.º 6
0
 @Override
 public long versionForId(int id) {
   MsgD msg = Msg.VERSION_FOR_ID.getWriterForInt(systemTransaction(), id);
   _client.write(msg);
   return _client.expectedBufferResponse(Msg.VERSION_FOR_ID).readLong();
 }